Vulnerabilities in pkg:npm/muhammara

PACKAGE
Advisory Summary

GHSA-fhp4-pr5j-46m5 is a HIGH (CVSS 7.5) muhammara has a null pointer vulnerability (CWE-476: NULL Pointer Dereference) affecting Muhammara libraries in the npm ecosystem. The issue involves muhammara has a null pointer dereference in lzwdecode filter when decodeparms omits earlychange key. Remediation is available by upgrading affected packages to version 6.0.5.

5 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/muhammara

5 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/muhammara. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-fhp4-pr5j-46m5 - HIGH Muhammara has a NULL pointer dereference in LZWDecode filter when DecodeParms omits EarlyChange key
GHSA-2r7v-cmch-5x26 CVE-2022-41957 HIGH muhammara and hummus vulnerable to Unchecked Return Value to NULL Pointer Dereference
GHSA-rcrx-fpjp-mfrw CVE-2022-39381 HIGH Unchecked Return Value to NULL Pointer Dereference in PDFDocumentHandler.cpp
GHSA-frp9-2v6r-gj97 CVE-2022-25885 HIGH muhammara and hummus vulnerable to null pointer dereference on bad response object
GHSA-9cv5-4wqv-9w94 CVE-2022-25892 HIGH muhammara and hummus vulnerable to denial of service by NULL pointer dereference

GHSA-fhp4-pr5j-46m5 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-fhp4-pr5j-46m5
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-476: NULL Pointer Dereference
Affected Product Muhammara
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix GHSA-fhp4-pr5j-46m5

To remediate this vulnerability, upgrade all affected Muhammara dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

muhammara fixed: 6.0.5
npm install muhammara@6.0.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls muhammara

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-fhp4-pr5j-46m5, inspect your project dependencies using npm:

npm ls muhammara

Analyze the terminal output to locate any version of Muhammara in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.0.5), your application is affected.

Note: The npm ls muhammara command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-476: NULL Pointer Dereference, where the product dereferences a pointer that it expects to be valid but is null. In Muhammara, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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->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 ```cpp 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](https://github.com/user-attachments/files/27186113/poc_muhammara_lzw_null.js)

GHSA-fhp4-pr5j-46m5 Affected Muhammara Versions

1 component(s)
Fixed Versions:
6.0.5
Product / Package Ecosystem Affected Versions Fixed Version
muhammara
npm
< 6.0.5
6.0.5

References

Frequently Asked Questions

What is GHSA-fhp4-pr5j-46m5?
GHSA-fhp4-pr5j-46m5 is a security vulnerability in Muhammara involving Muhammara has a NULL pointer dereference in LZWDecode filter when DecodeParms omits EarlyChange key under CWE-476: NULL Pointer Dereference.
Which Muhammara versions are affected?
Affected versions include releases prior to 6.0.5 across affected packages: muhammara.
What version fixes GHSA-fhp4-pr5j-46m5?
Upgrading to 6.0.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is muhammara affected?
Yes, muhammara is affected in releases prior to 6.0.5. Upgrade your dependency to 6.0.5 or later.
What is the CVSS score of GHSA-fhp4-pr5j-46m5?
GHSA-fhp4-pr5j-46m5 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with GHSA-fhp4-pr5j-46m5?
GHSA-fhp4-pr5j-46m5 is classified under CWE-476: NULL Pointer Dereference (The product dereferences a pointer that it expects to be valid but is NULL.).
How can I check npm dependencies for GHSA-fhp4-pr5j-46m5?
Run the dependency tree command: 'npm ls muhammara'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fhp4-pr5j-46m5",
  "modified" : "2026-06-26T20:55:18Z",
  "published" : "2026-06-26T20:55:18Z",
  "aliases" : [ ],
  "summary" : "Muhammara has a NULL pointer dereference in LZWDecode filter when DecodeParms omits EarlyChange key",
  "details" : "## Summary\n\nA 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.\n\n## Affected Version\n\nmuhammara <= 6.0.4 (latest)\n\n## Vulnerability Details\n\n**File:** `src/deps/PDFWriter/PDFParser.cpp` line 2107\n\n```cpp\nif (inDecodeParams)\n{\n    PDFObjectCastPtr<PDFInteger> earlyObj(\n        QueryDictionaryObject(inDecodeParams, \"EarlyChange\")\n    );\n    early = earlyObj->GetValue();  // NULL dereference when EarlyChange key is absent\n}\n```\n\nWhen `inDecodeParams` is non-NULL but lacks the `EarlyChange` key:\n1. `QueryDictionaryObject()` returns NULL\n2. `PDFObjectCastPtr<PDFInteger>(NULL)` wraps NULL\n3. `earlyObj->GetValue()` dereferences NULL → crash\n\n## PoC\n\n460-byte malicious PDF triggers crash via `startReadingFromStream()`:\n\n- PDF contains `/Filter /LZWDecode` with `/DecodeParms << >>` (empty, no EarlyChange)\n- Exit code: `0xC0000005` (Access Violation)\n\n## Fix\n\n```cpp\nif (earlyObj)\n    early = earlyObj->GetValue();\n```\n\n## Impact\n\nAny application accepting untrusted PDFs and using muhammara to read stream contents is vulnerable to DoS.\n\nSimilar to: CVE-2022-41957, CVE-2022-39381\n\n## PoC File\n[poc_muhammara_lzw_null.js](https://github.com/user-attachments/files/27186113/poc_muhammara_lzw_null.js)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "muhammara"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.0.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.0.4"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/julianhille/MuhammaraJS/security/advisories/GHSA-fhp4-pr5j-46m5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/julianhille/MuhammaraJS/commit/a98c07780241353334eb65bfca1df025f14be70b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/julianhille/MuhammaraJS"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-476" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-26T20:55:18Z",
    "nvd_published_at" : null
  }
}