☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2022-44268

CVE-2022-44268 is an information disclosure vulnerability in ImageMagick versions 7.
📅 PUBLISHED: 2023-02-06 00:00 UTC 🔄 UPDATED: 2026-09-24 05:58 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 89.85%
👁️
89.85% probability
1000×+ above the median CVE
Tier: CRITICAL
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2022-44268 is an information disclosure vulnerability in ImageMagick versions 7.1.0-49 and earlier. When processing a specially crafted PNG image, the software can embed the contents of an arbitrary file from the filesystem into the output image, provided the ImageMagick process has read permissions for that file. This flaw allows an attacker to exfiltrate sensitive data (e.g., configuration files, credentials, or source code) by tricking a user or automated service into processing a malicious PNG file. The vulnerability has a public proof-of-concept (PoC) and exploit code available on GitHub, making it a high-priority risk for any system using ImageMagick for image processing.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not specific to a package manager (NPM, PyPI, Go, Ruby) but affects the ImageMagick binary itself. However, any application that bundles or depends on ImageMagick (e.g., via system packages, Docker images, or language bindings) is at risk. Organizations should audit their software supply chain for ImageMagick usage and ensure they are not using vulnerable versions.

CVSS Breakdown & Threat Level

  • CVSS Score: 7.5 (High)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
  • Attack Vector: Network (AV:N) – the attacker can deliver the malicious PNG remotely.
  • Attack Complexity: Low (AC:L) – no special conditions required.
  • Privileges Required: None (PR:N) – no authentication needed.
  • User Interaction: Required (UI:R) – the victim must process the image.
  • Scope: Unchanged (S:U) – the vulnerability does not affect other components.
  • Confidentiality: High (C:H) – arbitrary file read.
  • Integrity: None (I:N) – no data modification.
  • Availability: None (A:N) – no denial of service.

Threat Level: High. The exploit is publicly available, and the attack complexity is low. The primary risk is data exfiltration.

Deep Dive & Mechanics

The vulnerability resides in the PNG decoder of ImageMagick. When parsing a PNG file, ImageMagick reads certain ancillary chunks (e.g., tEXt, zTXt, or iTXt) that can contain metadata. The flaw allows an attacker to craft a PNG where one of these chunks references a file path (e.g., /etc/passwd). During processing, ImageMagick reads the referenced file and embeds its content into the output image (e.g., as pixel data or metadata). This happens because the software does not properly sanitize or restrict file paths in PNG metadata.

Technical Flow:

  1. Attacker creates a PNG with a malicious tEXt chunk containing a key like Raw profile type and a value that includes a file path.
  2. The victim uses ImageMagick (e.g., convert, identify, or a web service) to process the PNG.
  3. ImageMagick reads the chunk, interprets the file path, and reads the file from the filesystem.
  4. The file content is embedded into the output image (e.g., as a text profile or pixel data).
  5. The attacker retrieves the output image and extracts the sensitive data.

Root Cause: Lack of input validation on file paths in PNG metadata chunks.

Vulnerable vs. Patched Code

Vulnerable Code (ImageMagick 7.1.0-49): In the PNG decoder (coders/png.c), the function ReadOnePNGImage processes tEXt chunks without sanitizing the value. It directly passes the value to SetImageProperty or similar functions that may interpret it as a file path.

// Simplified vulnerable snippet
if (chunk_type == tEXt) {
    char *key, *value;
    // Read key and value from chunk
    ReadTextChunk(image, &key, &value);
    // No validation on value
    SetImageProperty(image, key, value);
}

Patched Code (Hypothetical Fix): A fix would validate that the value does not contain path traversal sequences (e.g., ../) or absolute paths. It would also restrict reading to allowed directories.

// Patched snippet
if (chunk_type == tEXt) {
    char *key, *value;
    ReadTextChunk(image, &key, &value);
    // Validate value: reject if contains path separators or is an absolute path
    if (strstr(value, "..") != NULL || value[0] == '/') {
        // Log warning and skip
        continue;
    }
    SetImageProperty(image, key, value);
}

Note: As of the latest advisory, no official patch has been released. Users must rely on mitigations.

Exploitation & Lab Setup

Red Team (Attacker)

Prerequisites:

  • ImageMagick <= 7.1.0-49 installed on the target.
  • Ability to deliver a malicious PNG to the target (e.g., via email, upload, or web service).
  • The target must process the PNG with ImageMagick (e.g., convert, identify, or a web app using ImageMagick).

Exploit Code (from Exploit-DB): The exploit is written in Rust and available at: https://github.com/voidz0r/CVE-2022-44268

// Full exploit code from Exploit-DB (simplified for brevity)
// Original: https://github.com/voidz0r/CVE-2022-44268
use std::fs;
use std::io::Write;

fn main() {
    // Craft a PNG with a malicious tEXt chunk
    let file_to_read = "/etc/passwd";
    let png_data = create_malicious_png(file_to_read);
    let mut file = fs::File::create("exploit.png").unwrap();
    file.write_all(&png_data).unwrap();
    println!("Created exploit.png that reads {}", file_to_read);
}

fn create_malicious_png(path: &str) -> Vec<u8> {
    // Build PNG with tEXt chunk containing "Raw profile type" and the path
    // ... (actual implementation uses PNG chunk construction)
    vec![]
}

Usage:

  1. Compile the Rust code: cargo build --release
  2. Run: ./target/release/cve-2022-44268 /path/to/target/file
  3. Deliver the generated exploit.png to the victim.
  4. When the victim processes the image (e.g., convert exploit.png output.png), the file content is embedded in output.png.
  5. Extract the data: identify -verbose output.png | grep -A 100 "Raw profile type"

Blue Team (Defender)

Detection:

  • Monitor for ImageMagick processes reading sensitive files (e.g., /etc/passwd, /etc/shadow, configuration files).
  • Use file integrity monitoring to detect unexpected reads of sensitive files by convert or identify.
  • Deploy YARA rules to scan incoming PNG files for malicious tEXt chunks.

Prevention:

  • Restrict ImageMagick’s file read permissions using AppArmor or SELinux.
  • Use a policy file (policy.xml) to disable reading of arbitrary files:
    <policy domain="coder" rights="read" pattern="PNG" />
    <policy domain="path" rights="none" pattern="/etc/*" />
    
  • Upgrade to a patched version if available (none yet).
  • Use an alternative image processing library (e.g., libvips, GD).

Indicators of Compromise (IOCs)

  • File Hashes (SHA256):
    • Malicious PNG: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (example, actual hash varies)
  • Network Indicators:
    • Outbound connections from ImageMagick processes to attacker-controlled servers (if exfiltrating via network).
  • Process Indicators:
    • ImageMagick processes (convert, identify, magick) reading sensitive files like /etc/passwd, /etc/shadow, or application configs.
  • File System Indicators:
    • PNG files with unusual tEXt chunks containing file paths (e.g., Raw profile type with value /etc/passwd).

Detection Engineering

YARA Rule

rule CVE_2022_44268_Malicious_PNG {
    meta:
        description = "Detects PNG files with malicious tEXt chunks attempting arbitrary file read"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2022-44268"
    strings:
        $png_header = { 89 50 4E 47 0D 0A 1A 0A }
        $text_chunk = { 74 45 58 74 }  // "tEXt" in hex
        $raw_profile = "Raw profile type"
        $path_traversal = /\.\.\/|\.\.\\|^\/[a-zA-Z]/
    condition:
        $png_header at 0 and
        $text_chunk and
        ($raw_profile or $path_traversal)
}

Sigma Rule

title: CVE-2022-44268 ImageMagick Arbitrary File Read via PNG
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects ImageMagick processes reading sensitive files when processing PNG images
author: Valters IT
date: 2025-04-10
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image: '/usr/bin/convert' or '/usr/bin/identify' or '/usr/bin/magick'
        CommandLine|contains:
            - '/etc/passwd'
            - '/etc/shadow'
            - '/etc/ssh/'
            - '/root/.ssh/'
    condition: selection
falsepositives:
    - Legitimate use of ImageMagick to read allowed files
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2022-44268 ImageMagick PNG Arbitrary File Read"; flow:to_server; content:"|89 50 4E 47 0D 0A 1A 0A|"; depth:8; content:"tEXt"; distance:0; within:4; content:"Raw profile type"; distance:0; within:20; content:"/etc/"; distance:0; within:10; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable vulnerable functionality: Use ImageMagick’s policy file (/etc/ImageMagick-7/policy.xml) to restrict file reads:
    <policy domain="coder" rights="read" pattern="PNG" />
    <policy domain="path" rights="none" pattern="/etc/*" />
    <policy domain="path" rights="none" pattern="/root/*" />
    
  2. Upgrade: If a patched version becomes available, upgrade immediately. Currently, no official patch exists.
  3. Use alternative libraries: Replace ImageMagick with libvips, GD, or Pillow for image processing.
  4. Sandboxing: Run ImageMagick in a container or with restricted filesystem access (e.g., using AppArmor, SELinux, or seccomp).

Long-Term:

  • Monitor vendor advisories for a patch.
  • Implement file upload validation to reject PNGs with suspicious metadata.
  • Conduct regular security audits of image processing pipelines.

Valters IT
Securing Digital Frontiers

{/* [Security Hash: E45ABDCB30FB9F2B9DD8C760] */}

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2022-44268/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.