Vulnerabilities in pkg:npm/muhammara
PACKAGEGHSA-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.
pkg:npm/muhammara
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
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).
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.
npm install muhammara@6.0.5
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
GHSA-fhp4-pr5j-46m5 Affected Muhammara Versions
1 component(s)| 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?
Which Muhammara versions are affected?
What version fixes GHSA-fhp4-pr5j-46m5?
Is muhammara affected?
What is the CVSS score of GHSA-fhp4-pr5j-46m5?
What CWE is associated with GHSA-fhp4-pr5j-46m5?
How can I check npm dependencies for GHSA-fhp4-pr5j-46m5?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}