# GHSA-w9hm-4m3m-fxmm: ngx-extended-pdf-viewer bundles a version of pdf.js vulnerable to CVE-2026-16633

> Opening a malicious PDF allows attacker-controlled JavaScript execution in the hosting page context due to bundled pdf.js vulnerability.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 6 Aug 2026

## What is GHSA-w9hm-4m3m-fxmm?

GHSA-w9hm-4m3m-fxmm is a code injection vulnerability in ngx-extended-pdf-viewer, published on 6 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

ngx-extended-pdf-viewer embeds a fork of Mozilla's pdf.js rather than depending on pdfjs-dist, so this vulnerability is not visible to dependency scanners through package.json.

### Impact
Opening a malicious PDF can execute attacker-controlled JavaScript in the context of the hosting page. Upstream advisory: GHSA-hq66-cqwq-w95j / CVE-2026-16633.

### Exposure. 
The sandbox half of the issue requires enableScripting, which pdf.js enables by default but this library does not — so the default configuration was less exposed than upstream's. The other half concerns XFA rich text and is reachable whenever enableXfa is true, which is the default here. Do not assume the default configuration was safe.

### Patches
29.0.0-rc.3 cherry-picks Mozilla's fix (pdf.js 6.2.108) into both the stable and bleeding-edge engines. Only the latest release receives security updates.

### Workarounds
Set pdfDefaultOptions.enableXfa = false if you do not need XFA forms, and/or apply a CSP disallowing inline script-src.

### Verifying. 
From 29.0.0 the package ships sbom.json and vex.json. The SBOM records the applied fix as a CycloneDX pedigree.patches entry; the VEX carries a resolved_with_pedigree statement so scanners stop flagging the engine's nominal version.

## Which versions are affected by GHSA-w9hm-4m3m-fxmm?

2 open source packages ship an affected version, including ngx-extended-pdf-viewer.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ngx-extended-pdf-viewer` | npm | From 27.0.0-rc.0 | 29.0.0-rc.3 |
| `ngx-extended-pdf-viewer` | npm | From 27.0.0-rc.0 | 29.0.0-rc.3 |

## How do I fix GHSA-w9hm-4m3m-fxmm?

Upgrade ngx-extended-pdf-viewer to 29.0.0-rc.3 or later.

## Is GHSA-w9hm-4m3m-fxmm being exploited?

There is no known exploitation of GHSA-w9hm-4m3m-fxmm in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-w9hm-4m3m-fxmm and fix it if it is affected.

What it is: GHSA-w9hm-4m3m-fxmm is a code injection vulnerability in ngx-extended-pdf-viewer, published on 6 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-w9hm-4m3m-fxmm in the wild and no public exploit code.

Affected packages and fixed versions:
- ngx-extended-pdf-viewer (npm): affected from 27.0.0-rc.0; fixed in 29.0.0-rc.3
- ngx-extended-pdf-viewer (npm): affected from 27.0.0-rc.0; fixed in 29.0.0-rc.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-w9hm-4m3m-fxmm/ (Markdown: https://insights.sbomify.com/GHSA-w9hm-4m3m-fxmm/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-w9hm-4m3m-fxmm

---
From sbomify Insights: https://insights.sbomify.com/GHSA-w9hm-4m3m-fxmm/
Summaries are generated and may contain mistakes; the official description above is the record.
