Blame
| 7063ab | flichtenheld | 2026-12-03 15:23:04 | 1 | # CVE-2026-135412 - Pre-auth denial of service via oversized certificate serial number with Mbed TLS |
| 2 | ||||
| 3 | When certificate verification fails, `verify_callback()` calls `backend_x509_get_serial()` to format the certificate serial number as a decimal string for the VERIFY ERROR log message. The serial length is attacker-controlled and was unbounded. With Mbed TLS 3.x the conversion is performed by `mbedtls_mpi_write_string(..., 10, ...)`, whose runtime grows roughly eightfold for each doubling of the serial size; Mbed TLS 4.x and master use a quadratic `write_bignum()`. Reporter benchmarks against Mbed TLS 3.6.5 measured about 51 seconds of full CPU utilisation for a single 8 KB serial, and about 2.1 seconds on Mbed TLS 4.x. |
|||
| 4 | ||||
| 5 | Because the OpenVPN event loop is single-threaded, the conversion stalls the server for all other clients, and the work is triggered before any authentication: the attacker only needs to present a certificate that is not signed by the server CA. Builds using OpenSSL are not affected, and the code path is not reachable by an unauthenticated attacker when the server uses `--tls-auth`, `--tls-crypt` or `--tls-crypt-v2`. The fix rejects certificates at verification time when the serial exceeds 40 bytes, twice the RFC 5280 maximum, for both the Mbed TLS and OpenSSL backends. |
|||
| 6 | ||||
| 7 | OpenVPN versions 2.6.0 through 2.7.9 are affected. This is fixed in version 2.7.10. |
|||
| 8 | ||||
| 9 | CVE Record: [CVE-2026-135412](https://www.cve.org/CVERecord?id=CVE-2026-135412) |
|||
| 10 | ||||
| 11 | Github: |
|||
| 12 | * [OpenVPN/openvpn-private-issues#187](https://github.com/OpenVPN/openvpn-private-issues/pull/187) |
|||
| 13 | ||||
| 14 | Release notes: |
|||
| 15 | * [openvpn-2.7.10](https://community.openvpn.net/ReleaseHistory#openvpn-2710-released-2-december-2026) |
|||
| 16 | ||||
| 17 | Reported-By: Arturs Parker and Jim Biniyaz, ResilientX Security |
