Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm

GHSA-fhp4-pr5j-46m5

HIGH

Muhammara has a NULL pointer dereference in LZWDecode filter when DecodeParms omits EarlyChange key

Published
Jun 26, 2026
Updated
Jun 26, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

Blast Radius

1 pkg affected

Weekly download volume for affected packages — a proxy for how broadly this vulnerability is deployed.

muhammaranpm
53Kdownloads / week

Description

Summary

A NULL pointer dereference vulnerability exists in PDFParser::CreateFilterForStream() when processing a PDF stream with /Filter /LZWDecode and a /DecodeParms dictionary that does not contain the EarlyChange key. This causes an access violation (0xC0000005) and crashes the process.

Affected Version

muhammara <= 6.0.4 (latest)

Vulnerability Details

File: src/deps/PDFWriter/PDFParser.cpp line 2107

if (inDecodeParams)
{
    PDFObjectCastPtr<PDFInteger> earlyObj(
        QueryDictionaryObject(inDecodeParams, "EarlyChange")
    );
    early = earlyObj->GetValue();  // NULL dereference when EarlyChange key is absent
}

When inDecodeParams is non-NULL but lacks the EarlyChange key:

  1. QueryDictionaryObject() returns NULL
  2. PDFObjectCastPtr<PDFInteger>(NULL) wraps NULL
  3. earlyObj->GetValue() dereferences NULL → crash

PoC

460-byte malicious PDF triggers crash via startReadingFromStream():

  • PDF contains /Filter /LZWDecode with /DecodeParms << >> (empty, no EarlyChange)
  • Exit code: 0xC0000005 (Access Violation)

Fix

if (earlyObj)
    early = earlyObj->GetValue();

Impact

Any application accepting untrusted PDFs and using muhammara to read stream contents is vulnerable to DoS.

Similar to: CVE-2022-41957, CVE-2022-39381

PoC File

poc_muhammara_lzw_null.js

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmmuhammaraall versions6.0.5

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for muhammara. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update muhammara to 6.0.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-fhp4-pr5j-46m5 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-fhp4-pr5j-46m5 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-fhp4-pr5j-46m5. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

## Summary A NULL pointer dereference vulnerability exists in `PDFParser::CreateFilterForStream()` when processing a PDF stream with `/Filter /LZWDecode` and a `/DecodeParms` dictionary that does not contain the `EarlyChange` key. This causes an access violation (0xC0000005) and crashes the process. ## Affected Version muhammara <= 6.0.4 (latest) ## Vulnerability Details **File:** `src/deps/PDFWriter/PDFParser.cpp` line 2107 ```cpp if (inDecodeParams) { PDFObjectCastPtr<PDFInteger> earlyObj( QueryDictionaryObject(inDecodeParams, "EarlyChange") ); early = earlyObj->Get
O3 Security · Impact-Aware SCA

Is GHSA-fhp4-pr5j-46m5 in your dependencies?

O3 detects GHSA-fhp4-pr5j-46m5 across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.