Code execution via UTF-16 conversion overflow
Published Jan 13, 2022 · Updated Mar 5, 2025
Memory corruption in GPAC MP4Box 0.9.0-preview through 1.0.1 allows local users to execute code via a crafted text file. In gf_text_get_utf8_line in src/filters/load_text.c, UTF-16 input is converted into a 1,024-byte stack buffer even though the destination line can hold 2,048 bytes, permitting the conversion and subsequent copy to overwrite the stack. Opening the file in MP4Box requires user interaction; the published proof of concept triggers stack-smashing protection and aborts the process, while the CVE record reports possible code execution and privilege escalation.
Summary
What happened
Memory corruption in GPAC MP4Box 0.9.0-preview through 1.0.1 allows local users to execute code via a crafted text file. In gf_text_get_utf8_line in src/filters/load_text.c, UTF-16 input is converted into a 1,024-byte stack buffer even though the destination line can hold 2,048 bytes, permitting the conversion and subsequent copy to overwrite the stack. Opening the file in MP4Box requires user interaction; the published proof of concept triggers stack-smashing protection and aborts the process, while the CVE record reports possible code execution and privilege escalation.
The record
- CVE
- CVE-2021-40574
- Published
- Jan 13, 2022
- Updated
- Mar 5, 2025
- Vendor
- Unknown vendor
- Product
- Unknown product
- Classifications
- CWE-415, T1203
- Attack vector
- local
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jan 13, 2022CVE publishedPublication date reported by the CVE source.
- Mar 5, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
What conditions does exploitation require?
What is affected?
Affected products and versions are unavailable in this record.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Public exploit references
- GPAC issue 1897 crafted-file proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo