# CVE-2024-4367: PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF

> Missing type check in PDF.js allows arbitrary JavaScript execution, requiring users to upgrade Firefox and Thunderbird.

- **Severity:** Medium 5.6 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 May 2024
- **Updated:** 12 May 2026
- **Also known as:** CLSA-2026-1775089656, CLSA-2026-1788868464, DEBIAN-CVE-2024-4367, DSA-5742-1, ECHO-6650-6464-0a5f, GHSA-wgrm-67xf-hhpq, ROOT-APP-NPM-CVE-2024-4367, ROOT-OS-DEBIAN-12-CVE-2024-4367, UBUNTU-CVE-2024-4367

## What is CVE-2024-4367?

CVE-2024-4367 is a medium-severity code injection vulnerability in Debian Debian Linux, published on 14 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A type check was missing when handling fonts in PDF.js, which would allow arbitrary JavaScript execution in the PDF.js context. This vulnerability affects Firefox < 126, Firefox ESR < 115.11, and Thunderbird < 115.11.

Weakness: CWE-754 (Improper Check for Unusual or Exceptional Conditions)

## Which versions are affected by CVE-2024-4367?

2 open source packages ship an affected version, including pdfjs-dist. It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pdfjs-dist` | npm | All versions | 4.2.67 |
| `pdfjs-dist` | npm | All versions | 4.2.67 |

Products: Debian Debian Linux, Mozilla Firefox, Mozilla Thunderbird, Open-Xchange Open-Xchange Appsuite Frontend.

## How do I fix CVE-2024-4367?

Upgrade pdfjs-dist to 4.2.67 or later.

## Is CVE-2024-4367 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-4367 exists.

Public exploit code:

- CVE-2024-4367 & CVE-2024-34342 Proof of Concept (github_poc): https://github.com/LOURC0D3/CVE-2024-4367-PoC
- CVE-2024-4367 arbitrary js execution in pdf js (github_poc): https://github.com/s4vvysec/CVE-2024-4367-POC
- PDF.js是由Mozilla维护的基于JavaScript的PDF查看器。此漏洞允许攻击者在打开恶意 PDF 文件后立即执行任意 JavaScript 代码。这会影响所有 Firefox 用户 （<126），因为 Firefox 使用 PDF.js 来显示 PDF 文件，但也严重影响了许多基于 Web 和 Electron 的应用程序，这些应用程序（间接）使用 PDF.js 进行预览功能。 (github_poc): https://github.com/Zombie-Kaiser/cve-2024-4367-PoC-fixed
- YARA detection rule for CVE-2024-4367 arbitrary javascript execution in PDF.js (github_poc): https://github.com/spaceraccoon/detect-cve-2024-4367
- This project is intended to serve as a proof of concept to demonstrate exploiting the vulnerability in the PDF.js (pdfjs-dist) library reported in CVE-2024-4367 (github_poc): https://github.com/snyk-labs/pdfjs-vuln-demo
- PoC - Prueba de Concepto de CVE-2024-4367 en conjunto al CVE-2023-38831 en un solo Script (github_poc): https://github.com/UnHackerEnCapital/PDFernetRemotelo

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-4367 and fix it if it is affected.

What it is: CVE-2024-4367 is a medium-severity code injection vulnerability in Debian Debian Linux, published on 14 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-4367 exists.

Affected packages and fixed versions:
- pdfjs-dist (npm): affected all versions; fixed in 4.2.67
- pdfjs-dist (npm): affected all versions; fixed in 4.2.67

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/CVE-2024-4367/ (Markdown: https://insights.sbomify.com/CVE-2024-4367/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-4367
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-4367
- OSV: https://osv.dev/vulnerability/CVE-2024-4367

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-4367/
Summaries are generated and may contain mistakes; the official description above is the record.
