CVE-2024-45159
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedAn issue was discovered in Mbed TLS 3.x before 3.6.1. With TLS 1.3, when a server enables optional authentication of the client, if the client-provided certificate does not have appropriate values in if keyUsage or extKeyUsage extensions, then the return value of mbedtls_ssl_get_verify_result() would incorrectly have the MBEDTLS_X509_BADCERT_KEY_USAGE and MBEDTLS_X509_BADCERT_KEY_USAGE bits clear. As a result, an attacker that had a certificate valid for uses other than TLS client authentication would nonetheless be able to use it for TLS client authentication. Only TLS 1.3 servers were affected, and only with optional authentication (with required authentication, the handshake would be aborted with a fatal alert).
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceIn Mbed TLS 3.x before 3.6.1, TLS 1.3 servers with optional client authentication fail to properly set MBEDTLS_X509_BADCERT_KEY_USAGE and MBEDTLS_X509_BADCERT_EXTSKUSAGE flags when a client presents a certificate lacking appropriate keyUsage or extKeyUsage extensions. This allows attackers to bypass client certificate validation using certificates valid for non-TLS purposes.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data>= 3.2.0, < 3.6.1CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify Mbed TLS library versionLocate the mbedtls version header file or library binary and read its version information. Common locations include /usr/include/mbedtls/version.h or the library file itself. Look for MBEDTLS_VERSION_NUMBER or mbedtls_version.hAffected if Version is 3.2.0 or higher but lower than 3.6.1 (the library falls within the affected range)
-
Confirm TLS 1.3 is enabled in build configurationInspect the mbedtls config.h or the compiled configuration macros (MBEDTLS_TLS_VERSION_1_3_ENABLED or similar). Check if MBEDTLS_SSL_TLS_C and MBEDTLS_SSL_PROTO_TLS1_3_MEMBER are definedAffected if TLS 1.3 protocol support is compiled into the library
-
Verify optional client authentication is configuredInspect the SSL context setup code or configuration. Look for mbedtls_ssl_config_defaults() calls and check if MBEDTLS_SSL_VERIFY_OPTIONAL is set versus MBEDTLS_SSL_VERIFY_REQUIRED in the client authentication settingsAffected if Client certificate verification is set to MBEDTLS_SSL_VERIFY_OPTIONAL (allowing connections without a valid client cert)
-
Inspect certificate validation logic for key usage checksExamine the code path handling MBEDTLS_X509_BADCERT_KEY_USAGE and MBEDTLS_X509_BADCERT_EXTSKUSAGE flag handling after mbedtls_x509_crt_verify() returns. Look for whether these specific flags are properly propagated when keyUsage or extKeyUsage extensions are missing or invalidAffected if The verification logic does not properly set or check MBEDTLS_X509_BADCERT_KEY_USAGE and MBEDTLS_X509_BADCERT_EXTSKUSAGE flags for TLS 1.3 with optional auth
A user is affected if running Mbed TLS 3.2.0-3.6.0 with TLS 1.3 enabled and optional client authentication configured, where certificates lacking proper keyUsage or extKeyUsage extensions may be accepted without the appropriate error flags being set.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped3.6.1
Upgrade to Mbed TLS 3.6.1 or later. As a temporary workaround, ensure only certificates with explicit TLS client auth keyUsage are accepted until the library upgrade is applied.
3.6.1
- 1. Identify all systems and applications using Mbed TLS library version 3.2.0 or later but earlier than 3.6.1
- 2. Plan and schedule maintenance window for the upgrade
- 3. Download or obtain Mbed TLS version 3.6.1 or later from the official repository or distribution channel
- 4. Rebuild and recompile all applications and services that link against the Mbed TLS library
- 5. Deploy the updated library and restart all affected services
- 6. Verify that TLS 1.3 client certificate validation is now working correctly with proper keyUsage and extKeyUsage checks
- 7. Monitor for any issues after deployment
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation8.0 h
- Testing6.0 h
- Review / QA3.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,248.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2024-45159 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2024-45159 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data