# CVE-2025-57753: vite-plugin-static-copy files not included in `src` are accessible with a crafted request

> Attackers can access files outside the intended source directory via crafted requests in vite-plugin-static-copy.

- **Severity:** Medium 6.0 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N`)
- **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:** 21 Aug 2025
- **Updated:** 21 Aug 2025
- **Also known as:** GHSA-pp7p-q8fx-2968

## What is CVE-2025-57753?

CVE-2025-57753 is a medium-severity path traversal vulnerability in sapphi-red vite-plugin-static-copy, published on 21 Aug 2025. 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

vite-plugin-static-copy is rollup-plugin-copy for Vite with dev server support. Files not included in src are accessible with a crafted request. The vulnerability is fixed in 2.3.2 and 3.1.2.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2025-57753?

4 open source packages ship an affected version, including vite-plugin-static-copy.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `vite-plugin-static-copy` | npm | From 0.4.3 | 2.3.2 |
| `vite-plugin-static-copy` | npm | From 0.4.3 | 2.3.2 |
| `vite-plugin-static-copy` | npm | From 3.0.0 | 3.1.2 |
| `vite-plugin-static-copy` | npm | From 3.0.0 | 3.1.2 |

## How do I fix CVE-2025-57753?

Upgrade vite-plugin-static-copy to a fixed version for your release line: 2.3.2 or 3.1.2.

## Is CVE-2025-57753 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-57753 and fix it if it is affected.

What it is: CVE-2025-57753 is a medium-severity path traversal vulnerability in sapphi-red vite-plugin-static-copy, published on 21 Aug 2025. An attacker can exploit it over the internet without logging in, 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-2025-57753 exists.

Affected packages and fixed versions:
- vite-plugin-static-copy (npm): affected from 0.4.3; fixed in 2.3.2
- vite-plugin-static-copy (npm): affected from 0.4.3; fixed in 2.3.2
- vite-plugin-static-copy (npm): affected from 3.0.0; fixed in 3.1.2
- vite-plugin-static-copy (npm): affected from 3.0.0; fixed in 3.1.2

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

## Sources

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

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