CVE-2026-56369: ImageMagick AES-CTR Nonce Reuse Information Disclosure (Low Severity)
ImageMagick before version 7.1.2-22 has a weakness in how it encrypts images using the PasskeyEncipherImage method. The vulnerability stems from reusing the same nonce (a number meant to be used only once) with AES-CTR encryption. When nonces are reused in stream ciphers like AES-CTR, attackers can mathematically recover the original unencrypted image data without knowing the encryption key. This is a cryptographic weakness rather than a traditional code execution flaw, but it completely undermines the confidentiality protection that encryption is supposed to provide.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 3.7 LOW · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
- Weaknesses (CWE)
- CWE-323
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-30 / 2026-07-02
NVD description (verbatim)
ImageMagick before 7.1.2-22 contains an information disclosure vulnerability in the PasskeyEncipherImage method due to AES-CTR nonce reuse. Attackers can exploit nonce reuse in the cipher implementation to recover plaintext information from encrypted images.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-56369 involves improper nonce management in ImageMagick's PasskeyEncipherImage function. AES-CTR (Advanced Encryption Standard in Counter mode) is a stream cipher that generates a keystream by encrypting sequential counter values with a block cipher. The security of AES-CTR depends critically on never reusing the same nonce with the same key—doing so allows an attacker to XOR two ciphertexts together to cancel out the keystream and recover plaintext. The vulnerability indicates that ImageMagick's implementation reuses nonces under certain conditions, potentially within the same image encryption session or across multiple encryptions with the same key. This violates CWE-323 (Reuse of Nonce, Key Pair in Encryption), a well-known cryptographic anti-pattern. Versions prior to 7.1.2-22 are affected.
Business impact
Organizations using ImageMagick to encrypt sensitive images—such as medical imaging systems, document management platforms, or content distribution services—face confidentiality breaches. An attacker with network access to encrypted images can extract the plaintext without the encryption key, violating data protection obligations. The impact is particularly severe in regulated industries (healthcare, finance) where image encryption is relied upon for HIPAA, PCI-DSS, or similar compliance. However, the attack requires the attacker to possess the encrypted images themselves and potentially knowledge of which images share encryption context, limiting the immediate threat surface in many deployments.
Affected systems
ImageMagick versions before 7.1.2-22 are vulnerable. ImageMagick is widely used in server-side image processing for web applications, content management systems, document conversion pipelines, and scientific imaging workflows. Any system that uses the PasskeyEncipherImage method to encrypt image data is at risk. Desktop and server installations across Linux, Windows, and macOS distributions are affected if running vulnerable versions.
Exploitability
Exploitability is limited by practical constraints. An attacker must: (1) obtain the encrypted images; (2) potentially have multiple encrypted images from the same encryption context to leverage nonce reuse; and (3) possess computational resources to perform XOR operations and cryptanalysis. There is no remote code execution, and the attack does not require authentication or user interaction. The CVSS score of 3.7 (LOW) reflects these factors—low attack vector complexity, but limited impact (confidentiality only) and the requirement to obtain ciphertexts. This is not an actively exploited vulnerability in the wild according to current threat intelligence.
Remediation
Upgrade ImageMagick to version 7.1.2-22 or later. The patched version addresses nonce reuse by ensuring that each encryption operation generates or uses a unique nonce. Organizations should verify that their ImageMagick installation explicitly uses the PasskeyEncipherImage method; if image encryption is not a feature in use, the practical risk is minimal. After patching, re-encrypt any sensitive images that may have been protected with vulnerable versions if the encryption keys have potentially been compromised or if images were accessible to untrusted parties.
Patch guidance
Apply the upgrade to ImageMagick 7.1.2-22 or later through your package manager or by downloading from the official ImageMagick repository. Verify the patch has been applied by checking the version string (convert -version or identify -version). Test the patched version in a non-production environment to ensure compatibility with your image processing workflows and dependent applications. Pay particular attention to custom scripts or applications that call PasskeyEncipherImage directly, and confirm they continue to function correctly post-patch.
Detection guidance
Monitor ImageMagick process execution and logging for version identification. If you maintain detailed logs of image encryption operations, review them for patterns consistent with nonce reuse (e.g., identical encryption parameters or timestamps in rapid succession with the same key material). Network-based detection is difficult; this vulnerability manifests as data loss (unauthorized plaintext recovery) rather than system intrusion. Conduct an inventory of all systems running ImageMagick, especially in image processing pipelines, and prioritize those that handle sensitive or regulated image data.
Why prioritize this
Although assigned a LOW CVSS score, this vulnerability should be prioritized in environments where ImageMagick's encryption features are actively used to protect sensitive images. The fact that it does not appear on the KEV catalog suggests limited active exploitation, but the cryptographic nature of the flaw means that any images encrypted with vulnerable versions remain at risk indefinitely—decryption can occur long after the attack. Organizations in regulated industries or those encrypting confidential imagery should treat this as higher priority than the CVSS score alone suggests.
Risk score, explained
The CVSS 3.1 score of 3.7 (LOW) reflects: Attack Vector = Network (images could be exfiltrated); Attack Complexity = High (attacker must obtain encrypted images and possess cryptanalytic capability); Privileges Required = None; User Interaction = None; Scope = Unchanged; Confidentiality Impact = Low (plaintext recovery is possible but depends on attacker effort); Integrity = None; Availability = None. The 'Low' rating is appropriate for a confidentiality-only cryptographic weakness without active exploitation, but it may underestimate risk in scenarios where encrypted images are high-value assets or compliance-critical.
Frequently asked questions
If I'm not using ImageMagick's PasskeyEncipherImage method, am I affected?
No. This vulnerability is specific to the PasskeyEncipherImage function. If your deployment uses ImageMagick only for image resizing, format conversion, or other non-cryptographic operations, you are not affected by this flaw. However, you should still keep ImageMagick updated for other potential security issues.
Can attackers exploit this vulnerability remotely without any images?
No. An attacker must obtain or intercept the encrypted images themselves to exploit nonce reuse. The vulnerability does not enable remote code execution or unauthenticated access to the ImageMagick service. If encrypted images are stored securely and transmitted over authenticated channels, exposure is minimized.
Will upgrading to 7.1.2-22 decrypt my existing encrypted images?
No. Upgrading fixes the nonce reuse issue going forward, but it does not retroactively re-encrypt or recover images encrypted with vulnerable versions. If you suspect your encrypted images may have been exposed or compromised, and the encryption keys remain secret, the patch secures future encryption operations. However, for compliance or high-assurance scenarios, consider re-encrypting sensitive image archives with the patched version.
How urgent is this patch in a typical production environment?
Priority depends on your use case. If ImageMagick is used for non-cryptographic image processing (the majority of deployments), this is routine maintenance. If you actively encrypt images for confidentiality, patch within your normal security update cycle—there is no indication of active exploitation, so a few weeks' lag is acceptable if you've validated testing. Regulated industries handling sensitive imagery should prioritize higher.
This analysis is based on the CVE record and publicly available information as of the publication date. CVSS scores and severity ratings are provided by the CVE/NVD and represent a standardized assessment; actual risk varies by deployment context. No exploit code or weaponized proof-of-concept is provided. Organizations should verify patch availability and compatibility with their specific ImageMagick distribution before deployment. This vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities catalog, but that status may change. For the latest security updates and vendor advisories, consult the official ImageMagick security documentation. Source: NVD (public-domain), retrieved 2026-08-09. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-21383HIGHQualcomm AES-GCM Static IV Weakness Affects FastConnect and QCA Chipsets
- CVE-2026-55967HIGHAES-GCM Counter Wraparound in wolfSSL Streaming APIs
- CVE-2026-56361LOWImageMagick Off-By-One Heap Buffer Read Vulnerability
- CVE-2026-56362LOWImageMagick Heap Buffer Overflow in GetPixelIndex
- CVE-2026-56363LOWImageMagick Division by Zero Denial of Service
- CVE-2026-56364LOWImageMagick OpenCL Memory Leak Vulnerability - Low Severity
- CVE-2026-56365LOWImageMagick PNG Encoder Memory Leak in MNG Processing
- CVE-2026-56366LOWImageMagick Memory Leak in META Reader (APP1JPEG)