# CVE-2024-43373: webcrack has an Arbitrary File Write Vulnerability on Windows when Parsing and Saving a Malicious Bundle

> An attacker can overwrite arbitrary files on Windows systems via path traversal in webcrack, potentially leading to arbitrary code execution.

- **Severity:** High 7.7 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 15 Aug 2024
- **Updated:** 15 Aug 2024
- **Also known as:** GHSA-ccqh-278p-xq6w

## What is CVE-2024-43373?

CVE-2024-43373 is a high-severity path traversal vulnerability in j4k0xb webcrack, published on 15 Aug 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

webcrack is a tool for reverse engineering javascript. An arbitrary file write vulnerability exists in the webcrack module when processing specifically crafted malicious code on Windows systems. This vulnerability is triggered when using the unpack bundles feature in conjunction with the saving feature. If a module name includes a path traversal sequence with Windows path separators, an attacker can exploit this to overwrite files on the host system. This vulnerability allows an attacker to write arbitrary `.js` files to the host system, which can be leveraged to hijack legitimate Node.js modules to gain arbitrary code execution. This vulnerability has been patched in version 2.14.1.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), CWE-20 (Improper Input Validation)

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

2 open source packages ship an affected version, including webcrack. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `webcrack` | npm | All versions | 2.14.1 |
| `webcrack` | npm | All versions | 2.14.1 |

Products: J4k0xb Webcrack.

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

Upgrade webcrack to 2.14.1 or later.

## Is CVE-2024-43373 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2024-43373 is a high-severity path traversal vulnerability in j4k0xb webcrack, published on 15 Aug 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-43373 exists.

Affected packages and fixed versions:
- webcrack (npm): affected all versions; fixed in 2.14.1
- webcrack (npm): affected all versions; fixed in 2.14.1

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

## Sources

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

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