Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-4367 PoC — Mozilla Firefox 安全漏洞

Source
Associated Vulnerability
Title:Mozilla Firefox 安全漏洞 (CVE-2024-4367)
Description:Mozilla Firefox是美国Mozilla基金会的一款开源Web浏览器。 Mozilla Firefox 126 版本之前存在安全漏洞,该漏洞源于处理 PDF.js 中的字体时缺少类型检查,这将允许在 PDF.js 环境中执行任意 JavaScript。
Description
CVE-2024-4367 & CVE-2024-34342 Proof of Concept
Readme
# CVE-2024-4367 & CVE-2024-34342: Arbitrary JavaScript execution in PDF.js

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.

If pdf.js is used to load a malicious PDF, and PDF.js is configured with isEvalSupported set to true (which is the default value), unrestricted attacker-controlled JavaScript will be executed in the context of the hosting domain.

- JS Execution
```
python3 CVE-2024-4367.py "alert(document.domain)"
```

![PoC_JS](./result_js.png)

- OS Command Execution (only Electron based)
```
python3 CVE-2024-4367.py "require('child_process').exec('open -a /Applications/Calculator.app');"
```

![PoC_OS](./result_os.png)


This is not my bug, I just made a PoC for it.

# Reference

- https://github.com/advisories/GHSA-wgrm-67xf-hhpq
- https://nvd.nist.gov/vuln/detail/CVE-2024-4367
File Snapshot

[4.0K] /data/pocs/ff08829e0ec8e7c1a34772a7a64f86f41a59d703 ├── [2.4K] CVE-2024-4367.py ├── [ 970] README.md ├── [800K] result_js.png └── [357K] result_os.png 0 directories, 4 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.