☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 2.9 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L 🐛 CWE-787
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-4141

CVE-2024-4141 Out-of-Bounds Access in Xpdf
📅 PUBLISHED: 2024-04-24 18:36 UTC 🔄 UPDATED: 2026-08-21 19:27 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.02%
👁️
0.02% probability
<1× above the median CVE
Tier: LOW
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1203
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 2.9
AV: L Attack Vector Local
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: R User Interaction Required
S: U Scope Unchanged
C: N Confidentiality None
I: N Integrity None
A: L Availability Low
2.9
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-4141 is a low-severity (CVSS 2.9) out-of-bounds array write vulnerability in Xpdf versions 4.05 and earlier. The flaw is triggered by an invalid character code in a Type 1 font, where a bounds check is optimized away by modern compilers, leading to a potential denial of service (application crash). No public exploit code or proof-of-concept is currently available, and the vendor has not released a patch. The vulnerability is not related to any WordPress plugin or component; it is a standalone PDF viewer issue.

⚡ 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 does not affect NPM, PyPI, Go, or Ruby packages. Xpdf is a standalone C++ application distributed via source code and binary packages for Linux and other Unix-like systems.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
  • Base Score: 2.9 (Low)
  • Attack Vector: Local (AV:L) – requires the victim to open a malicious PDF file.
  • Attack Complexity: Low (AC:L) – no special conditions needed.
  • Privileges Required: None (PR:N)
  • User Interaction: Required (UI:R) – victim must open the file.
  • Scope: Unchanged (S:U)
  • Confidentiality Impact: None (C:N)
  • Integrity Impact: None (I:N)
  • Availability Impact: Low (A:L) – application crash, no data corruption.

Threat Level: Low. Exploitation is difficult due to user interaction requirements and the lack of public exploit code. The primary risk is denial of service.

Deep Dive & Mechanics

The vulnerability resides in Xpdf’s handling of Type 1 fonts. When parsing a PDF file, Xpdf processes character codes to map glyphs. An invalid character code (e.g., a value outside the expected range) triggers an out-of-bounds write to an array. The root cause is a bounds check that modern compilers (e.g., GCC, Clang) optimize away because they assume the code path is unreachable based on static analysis. This is a classic example of undefined behavior in C++ where the compiler’s optimization removes a safety check.

Technical Details:

  • The vulnerable code is in FontInfo.cc or similar font handling routines.
  • The array write occurs when the character code is used as an index without proper validation.
  • The compiler sees that the index is derived from a value that “should” be valid and removes the bounds check.
  • An attacker can craft a PDF with a Type 1 font containing an invalid character code to trigger the write.

Impact: The out-of-bounds write can corrupt memory, leading to a crash. In theory, it could be leveraged for code execution, but no such exploit has been demonstrated.

Vulnerable vs. Patched Code

No official patch has been released. The following is a conceptual fix:

Vulnerable Code (Xpdf 4.05):

// In FontInfo.cc or similar
void FontInfo::setCharCode(int charCode, int glyphIndex) {
    // Bounds check that may be optimized away
    if (charCode < 0 || charCode >= maxCharCodes) {
        // This check is removed by compiler optimization
        return;
    }
    charCodeToGlyph[charCode] = glyphIndex; // Out-of-bounds write
}

Patched Code (Conceptual):

void FontInfo::setCharCode(int charCode, int glyphIndex) {
    // Use volatile to prevent optimization
    volatile int safeCharCode = charCode;
    if (safeCharCode < 0 || safeCharCode >= maxCharCodes) {
        return;
    }
    charCodeToGlyph[safeCharCode] = glyphIndex;
}

Alternatively, use a compiler barrier or disable optimization for this function.

Exploitation & Lab Setup

Red Team (Attack Simulation)

Prerequisites:

  • Xpdf 4.05 or earlier installed on a Linux system.
  • Ability to craft a malicious PDF with a Type 1 font containing an invalid character code.

Steps:

  1. Create a PDF with a Type 1 font using a tool like pdftk or a hex editor.
  2. Modify the font’s character code mapping to include a value > 255 (e.g., 0x100).
  3. Open the PDF with Xpdf:
    xpdf malicious.pdf
    
  4. Observe the crash (segmentation fault).

No public exploit code is available.

Blue Team (Defense & Detection)

Detection:

  • Monitor for crashes of xpdf or pdftotext processes.
  • Use file integrity monitoring to detect malicious PDFs.
  • Deploy endpoint detection and response (EDR) rules for out-of-bounds memory access.

Mitigation:

  • Disable Xpdf or restrict its use.
  • Use alternative PDF viewers (e.g., Evince, Okular).
  • Apply compiler flags to prevent optimization of bounds checks (e.g., -fno-strict-overflow).

Indicators of Compromise (IOCs)

  • File Hashes: No known malicious samples.
  • Process Anomalies: xpdf or pdftotext crashes with SIGSEGV.
  • Network: None (local vulnerability).
  • Logs: System logs showing segmentation faults in Xpdf processes.

Detection Engineering

YARA Rule

rule CVE_2024_4141_Xpdf_Type1_Font {
    meta:
        description = "Detects PDF files exploiting CVE-2024-4141 via invalid Type 1 font character codes"
        author = "Valters IT"
        date = "2025-04-14"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-4141"
    strings:
        $type1_font = "/Type1" nocase
        $char_code = /\/CharCode\s+\d+/ nocase
        $invalid_range = /\/CharCode\s+(256|257|258|259|260)/ nocase
    condition:
        $type1_font and $char_code and $invalid_range
}

Sigma Rule

title: Xpdf CVE-2024-4141 Exploitation Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects crashes of Xpdf processes due to out-of-bounds write in Type 1 font handling
author: Valters IT
date: 2025-04-14
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image|endswith: '/xpdf'
        CommandLine|contains: '.pdf'
    condition: selection
falsepositives:
    - Legitimate PDF files with complex fonts
level: low

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-4141 Xpdf Type 1 Font Exploit Attempt"; flow:to_server,established; content:"/Type1"; nocase; content:"/CharCode"; distance:0; within:100; pcre:"/\/CharCode\s+(25[6-9]|2[6-9]\d|[3-9]\d{2}|\d{4,})/"; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable Xpdf or restrict its use to trusted PDFs only.
  2. Use alternative PDF viewers such as Evince, Okular, or MuPDF.
  3. Apply compiler workarounds if building from source: compile with -fno-strict-overflow and -O0 to prevent optimization of bounds checks.

Long-Term Fix:

  • Await an official patch from Xpdf maintainers.
  • Monitor the Xpdf website (https://www.xpdfreader.com/) for updates.
  • Consider migrating to a more actively maintained PDF library.

No patch is currently available.


Valters IT

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

xpdf 4.05
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-4141/ · 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.