Introduction
Remote code execution from a single malicious image is one of the most serious threats a mobile device faces. CVE-2025-21043, a high-severity out-of-bounds write in Samsung's Quram image codec library, exposes millions of Samsung Android devices running builds older than the September 2025 Security Maintenance Release to arbitrary code execution.
About Samsung and Quram: Samsung is the largest global smartphone vendor and ships hundreds of millions of Android devices a year. Its proprietary Quram image codec, integrated since Android 4.4.4, handles custom image formats and sits deep inside the graphics subsystem. Bugs in this codec have repeatedly allowed remote exploitation through MMS, email, and web content, so the codec matters to attackers and defenders alike.
Technical Information
CVE-2025-21043 is an out-of-bounds write in libimagecodec.quram.so, a core shared object in Samsung's image-processing stack. A specially crafted image file triggers the bug during parsing and lets attacker-controlled data overwrite memory outside allocated buffers. That can lead to remote code execution in the context of the image-processing service or application.
The Quram codec has a reputation for complex, memory-unsafe C code. Earlier research by Google Project Zero (see Project Zero analysis) found large functions with minimal bounds checking and a history of buffer overflows. The exact vulnerable function for CVE-2025-21043 is not public, but the pattern matches earlier vulnerabilities in which image metadata or decompression routines failed to validate input sizes and allowed out-of-bounds writes.
The vulnerability is remotely exploitable. An attacker can deliver a malicious image through MMS, an email attachment, or web content. The device only has to process the image, and in some messaging and preview scenarios that happens automatically, with no user interaction. The codec is integrated with Android's Skia graphics library, and system services handle images automatically, which makes the attack surface large.
No public code snippets or proof of concept are available for this issue. Samsung addressed the vulnerability in the September 2025 SMR.
Affected Systems and Versions
- Products: Samsung Android smartphones, tablets, and other devices that use the Quram image codec
- Component:
libimagecodec.quram.so - Version range: All Samsung devices with the Quram image codec prior to September 2025 Security Maintenance Release 1
- Configurations: Devices running Samsung's proprietary Android builds with Quram integration (typically all Galaxy series and related models)
Vendor Security History
Samsung has a documented history of critical vulnerabilities in its Quram image codec:
- CVE-2020-8899: Zero-click MMS remote code execution, affecting all Samsung devices since 2014
- CVE-2021-25346: Information disclosure in Quram ImageCodec
Samsung's patch response time has improved. The company ships monthly security updates and has a five-year support policy for flagship devices. Memory-safety bugs keep recurring in proprietary components like Quram, though, and they remain a risk.



