CVE-2007-4987
CVE-2007-4987 is a critical-severity vulnerability in Imagemagick with a CVSS 2.0 base score of 9.3. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-189.
Key facts
- Severity: Critical (CVSS 2.0 base score 9.3)
- EPSS exploit prediction: 4% (89th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-189
- Affected product: Imagemagick
- Published:
- Last modified:
Description
Off-by-one error in the ReadBlobString function in blob.c in ImageMagick before 6.3.5-9 allows context-dependent attackers to execute arbitrary code via a crafted image file, which triggers the writing of a '\0' character to an out-of-bounds address.
Frequently asked questions
- What is CVE-2007-4987?
- Off-by-one error in the ReadBlobString function in blob.c in ImageMagick before 6.3.5-9 allows context-dependent attackers to execute arbitrary code via a crafted image file, which triggers the writing of a '\0' character to an out-of-bounds address.
- How severe is CVE-2007-4987?
- CVE-2007-4987 has a CVSS 2.0 base score of 9.3, rated critical severity.
- Is CVE-2007-4987 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 4% (89th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2007-4987?
- CVE-2007-4987 primarily affects Imagemagick. In total, 57 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2007-4987?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- When was CVE-2007-4987 published?
- CVE-2007-4987 was published on 2007-09-24 and last updated on 2026-06-16.
References
- http://bugs.gentoo.org/show_bug.cgi?id=186030
- http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=595
- http://secunia.com/advisories/26926
- http://secunia.com/advisories/27048
- http://secunia.com/advisories/27309
- http://secunia.com/advisories/27364
- http://secunia.com/advisories/27439
- http://secunia.com/advisories/28721
- http://secunia.com/advisories/36260
- http://security.gentoo.org/glsa/glsa-200710-27.xml
- http://studio.imagemagick.org/pipermail/magick-announce/2007-September/000037.html
- http://www.debian.org/security/2009/dsa-1858
- http://www.imagemagick.org/script/changelog.php
- http://www.mandriva.com/en/security/advisories?name=MDVSA-2008:035
- http://www.novell.com/linux/security/advisories/2007_23_sr.html
- http://www.securityfocus.com/archive/1/483572/100/0/threaded
- http://www.securityfocus.com/bid/25766
- http://www.securitytracker.com/id?1018729
- http://www.ubuntu.com/usn/usn-523-1
- http://www.vupen.com/english/advisories/2007/3245
- https://exchange.xforce.ibmcloud.com/vulnerabilities/36739
- https://issues.rpath.com/browse/RPL-1743
Affected products (57)
- cpe:2.3:a:imagemagick:imagemagick:5.3.3:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.3.8:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.4.2.3:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.4.3:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.4.4.5:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.4.7:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.4.8:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.4.8.2_1.1.0:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.5.3_.2_1.2.0:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.5.4:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.5.6:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.5.6.0_20030409:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.5.7:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:5.5.7.15:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.0:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.0.1:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.0.2:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.0.2.5:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.0.3:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.0.4:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.0.4.4:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.0.5:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.0.6:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.0.6.2:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.0.7:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.0.8:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.1:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.1.1:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.1.2:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.1.3:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.1.4:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.1.5:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.1.6:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.1.7:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.1.8:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.2:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.2.0.3:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.2.0.7:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.2.1:*:*:*:*:*:*:*
- cpe:2.3:a:imagemagick:imagemagick:6.2.2:*:*:*:*:*:*:*
More vulnerabilities in Imagemagick
- CVE-2004-0981 — Critical (CVSS 10.0): Buffer overflow in the EXIF parsing routine in ImageMagick before 6.1.0 allows remote attackers to execute arbitrary…
- CVE-2023-34152 — Critical (CVSS 9.8): A vulnerability was found in ImageMagick. This security flaw cause a remote code execution vulnerability in OpenBlob…
- CVE-2019-19952 — Critical (CVSS 9.8): In ImageMagick 7.0.9-7 Q16, there is a use-after-free in the function MngInfoDiscardObject of coders/png.c, related to…
- CVE-2019-19948 — Critical (CVSS 9.8): In ImageMagick 7.0.8-43 Q16, there is a heap-based buffer overflow in the function WriteSGIImage of coders/sgi.c.
- CVE-2018-16329 — Critical (CVSS 9.8): In ImageMagick before 7.0.8-8, a NULL pointer dereference exists in the GetMagickProperty function in…
- CVE-2018-16328 — Critical (CVSS 9.8): In ImageMagick before 7.0.8-8, a NULL pointer dereference exists in the CheckEventLogging function in MagickCore/log.c.
All CVEs affecting Imagemagick →
Other CWE-189 (Numeric Errors) vulnerabilities
- CVE-2015-8396 — Critical (CVSS 10.0): Integer overflow in the ImageRegionReader::ReadIntoBuffer function in…
- CVE-2015-7205 — Critical (CVSS 10.0): Integer underflow in the RTPReceiverVideo::ParseRtpPacket function in Mozilla Firefox before 43.0 and Firefox ESR 38.x…
- CVE-2015-6575 — Critical (CVSS 10.0): SampleTable.cpp in libstagefright in Android before 5.1.1 LMY48I does not properly consider integer promotion, which…
- CVE-2015-3864 — Critical (CVSS 10.0): Integer underflow in the MPEG4Extractor::parseChunk function in MPEG4Extractor.cpp in libstagefright in mediaserver in…
- CVE-2015-3836 — Critical (CVSS 10.0): The Parse_wave function in arm-wt-22k/lib_src/eas_mdls.c in the Sonivox DLS-to-EAS converter in Android before 5.1.1…
- CVE-2015-3834 — Critical (CVSS 10.0): Multiple integer overflows in the BnHDCP::onTransact function in media/libmedia/IHDCP.cpp in libstagefright in Android…