Skip to content

chore(deps): update dependency vite-plugin-static-copy to v2 [security]#264

Merged
renovate[bot] merged 1 commit into
mainfrom
deps/npm-vite-plugin-static-copy-vulnerability
Aug 21, 2025
Merged

chore(deps): update dependency vite-plugin-static-copy to v2 [security]#264
renovate[bot] merged 1 commit into
mainfrom
deps/npm-vite-plugin-static-copy-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Aug 21, 2025

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
vite-plugin-static-copy 1.0.6 -> 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

Configuration

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

🚦 Automerge: Enabled.

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 security Dependabot security alerts label Aug 21, 2025
@renovate renovate Bot merged commit 18bfd9e into main Aug 21, 2025
2 checks passed
@renovate renovate Bot deleted the deps/npm-vite-plugin-static-copy-vulnerability branch August 21, 2025 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Dependabot security alerts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants