Vulnerability record · CVE-2018-16323 · published 1 September 2018
CVE-2018-16323: ImageMagick XBM decoder leaks uninitialized memory via negative pixel value
Imagemagick · Imagemagick
ReadXBMImage in coders/xbm.c in ImageMagick before 7.0.8-9 leaves data uninitialized when processing an XBM file containing a negative pixel value. When ImageMagick is used as a library inside a process holding sensitive data, that memory can be exposed through the resulting image output. The flaw is an information disclosure issue, not code execution.
Description
ReadXBMImage in coders/xbm.c in ImageMagick before 7.0.8-9 leaves data uninitialized when processing an XBM file that has a negative pixel value. If the affected code is used as a library loaded into a process that includes sensitive information, that information sometimes can be leaked via the image data.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Automated analysis
high priorityPublic exploit code and a high EPSS score make exploitation likely, though the impact is limited to information disclosure rather than code execution.
What it is
ReadXBMImage in coders/xbm.c in ImageMagick before 7.0.8-9 leaves data uninitialized when processing an XBM file containing a negative pixel value. When ImageMagick is used as a library inside a process holding sensitive data, that memory can be exposed through the resulting image output. The flaw is an information disclosure issue, not code execution.
Impact
An attacker can read uninitialized heap memory from the host process, potentially exposing sensitive data such as credentials or keys that happen to reside in that memory. The leak is limited to whatever data is present in the uninitialized buffer.
Attack surface
Reached by supplying a crafted XBM file to any application that decodes images with the affected ImageMagick library. The CVSS vector indicates network delivery with no privileges required, but user interaction is required to get the file processed.
Exploitation
Not listed in CISA KEV, but EPSS is high at roughly 0.49 probability (98.8th percentile) and a public Exploit-DB entry (45890) exists, indicating exploit code is available. No ransomware association is documented.
What to do
- Upgrade ImageMagick to 7.0.8-9 or later, or apply the vendor patch commit 216d117f05bff87b9dc4db55a1b1fadb38bcb786.
- Apply the Ubuntu security updates referenced in USN-3785-1 and USN-4034-1 for packaged versions.
- Restrict or disable XBM decoding in image processing pipelines that do not need the format.
- Run image decoding in a sandboxed, low-privilege process that holds no sensitive data in memory.
Detection
- Monitor for XBM files with negative pixel values or malformed headers reaching image processing services.
- Alert on ImageMagick crashes or abnormal memory-related errors during XBM decode.
- Review image upload and conversion endpoints for untrusted XBM input and log the source of such files.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Affected products
2 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://github.com/ImageMagick/ImageMagick/commit/216d117f05bff87b9dc4db55a1b1fadb38bcb786 | Issue TrackingPatchThird Party Advisory |
| https://usn.ubuntu.com/3785-1/ | Third Party Advisory |
| https://usn.ubuntu.com/4034-1/ | Third Party Advisory |
| https://www.exploit-db.com/exploits/45890/ | ExploitThird Party AdvisoryVDB Entry |
| https://github.com/ImageMagick/ImageMagick/commit/216d117f05bff87b9dc4db55a1b1fadb38bcb786 | Issue TrackingPatchThird Party Advisory |
| https://usn.ubuntu.com/3785-1/ | Third Party Advisory |
| https://usn.ubuntu.com/4034-1/ | Third Party Advisory |
| https://www.exploit-db.com/exploits/45890/ | ExploitThird Party AdvisoryVDB Entry |
Track CVE-2018-16323 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2018-16323), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.