BreachSpiderVerified, not vibes

CVE-2007-4987 in Imagemagick

Critical 9.3 Fix available

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.

Affects 1 product from 1 vendor. Facts below cite their sources.

CVSS 2.09.3
EPSS3.8%
EPSS percentile91th
FixAvailable

Remotely exploitable over the network.

Affected products and versions

VendorProductAffected versions
Imagemagick Imagemagick 5.3.3 5.3.8 5.4.2.3 5.4.3 5.4.4.5 5.4.7
+51 more5.4.8 5.4.8.2_1.1.0 5.5.3_.2_1.2.0 5.5.4 5.5.6 5.5.6.0_20030409 5.5.7 5.5.7.15 6.0 6.0.1 6.0.2 6.0.2.5 6.0.3 6.0.4 6.0.4.4 6.0.5 6.0.6 6.0.6.2 6.0.7 6.0.8 6.1 6.1.1 6.1.2 6.1.3 6.1.4 6.1.5 6.1.6 6.1.7 6.1.8 6.2 6.2.0.3 6.2.0.7 6.2.1 6.2.2 6.2.3 6.2.3.4 6.2.4 6.2.4.3 6.2.4.5 6.2.5 6.2.6 6.2.7 6.2.8 6.2.9 6.2.9.2 6.3.1 6.3.2 6.3.3_3 6.3.3_5 6.3.3_6 6.3.4

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official 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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2007-4987
BreachSpider IDBS-2007-GLOBAL-019202-C
CVSS vectorAV:N/AC:M/Au:N/C:C/I:C/A:C
Published2007-09-24
Last modified2026-04-23
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-189: CWE-189

Analysis AI-written, not human-reviewed

This vulnerability was disclosed in 2007. A critical vulnerability affects Imagemagick systems (CVE-2007-4987). No public exploit code is currently available. Isolate affected systems if patching is not feasible.

Vulnerability details: 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. CVSS vector: AV:N/AC:M/Au:N/C:C/I:C/A:C.

Questions

What is CVE-2007-4987?

This vulnerability was disclosed in 2007. A critical vulnerability affects Imagemagick systems (CVE-2007-4987). No public exploit code is currently available. Isolate affected systems if patching is not feasible.

What is the CVSS score for CVE-2007-4987?

CVE-2007-4987 has CVSS 9.3 (Critical). Vector: AV:N/AC:M/Au:N/C:C/I:C/A:C. EPSS: 3.8%.

Is CVE-2007-4987 actively exploited?

No confirmed active exploitation of CVE-2007-4987 as of 2026-05-30.

How do I remediate CVE-2007-4987?

Priority: MEDIUM.

What systems are affected by CVE-2007-4987?

CVE-2007-4987 affects Imagemagick Imagemagick.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Imagemagick","product":"Imagemagick","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-04-23.