CVE-2025-57753: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in sapphi-red vite-plugin-static-copy
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.
AI Analysis
Technical Summary
CVE-2025-57753 is a path traversal vulnerability (CWE-22) found in the vite-plugin-static-copy, a plugin used with the Vite build tool to copy static files with support for the development server. This plugin is a successor or variant of rollup-plugin-copy, tailored for Vite environments. The vulnerability affects versions >= 0.4.3 and < 2.3.2, as well as >= 3.0.0 and < 3.1.2. The core issue is that files outside the intended source directory (src) can be accessed by an attacker through a specially crafted request that exploits improper limitation of pathnames to restricted directories. Essentially, the plugin fails to adequately sanitize or restrict file paths, allowing traversal outside the designated directory boundaries. This can lead to unauthorized access to files that should not be publicly accessible during development or build processes. The vulnerability has a CVSS 4.0 base score of 6.0, indicating a medium severity level. The vector indicates network attack vector (AV:N), low attack complexity (AC:L), no privileges required (PR:N), but user interaction is required (UI:P). The vulnerability impacts confidentiality (VC:H) but not integrity or availability. No known exploits are currently reported in the wild, and patches fixing the issue are available in versions 2.3.2 and 3.1.2. This vulnerability is particularly relevant to developers and organizations using Vite with this plugin in their build or development environments, as it can expose sensitive files unintentionally during development or testing phases, potentially leaking source code, configuration files, or other sensitive assets.
Potential Impact
For European organizations, the impact of CVE-2025-57753 can be significant, especially for those heavily reliant on modern frontend development frameworks like Vite. Exposure of sensitive files due to path traversal can lead to leakage of intellectual property, source code, environment configurations, or credentials embedded in configuration files. This can facilitate further attacks such as code injection, privilege escalation, or supply chain compromise. Organizations in sectors with strict data protection regulations (e.g., GDPR) may face compliance risks if sensitive personal data or credentials are exposed. The vulnerability primarily affects development and build environments, which might be less hardened than production, increasing the risk of exploitation during development cycles. Additionally, since the vulnerability requires user interaction (e.g., crafted requests), it may be exploited through social engineering or targeted attacks on developers or CI/CD pipelines. The medium severity score reflects a moderate risk, but the potential for cascading effects in software supply chains or development environments is notable.
Mitigation Recommendations
1. Upgrade vite-plugin-static-copy to versions 2.3.2 or 3.1.2 or later, where the vulnerability is fixed. 2. Review and restrict access to development and build servers, ensuring they are not exposed to untrusted networks or users. 3. Implement strict input validation and sanitization for any requests or inputs that interact with file paths in development tools. 4. Use containerization or isolated environments for development to limit the impact of potential file access vulnerabilities. 5. Audit build and deployment pipelines to ensure no sensitive files are inadvertently exposed or included in publicly accessible directories. 6. Educate developers about the risks of path traversal and the importance of using updated dependencies. 7. Monitor network traffic and logs for unusual or crafted requests targeting development servers or build tools. 8. Consider implementing web application firewalls (WAF) or runtime application self-protection (RASP) solutions that can detect and block path traversal attempts.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Ireland, Belgium
CVE-2025-57753: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in sapphi-red vite-plugin-static-copy
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-57753 is a path traversal vulnerability (CWE-22) found in the vite-plugin-static-copy, a plugin used with the Vite build tool to copy static files with support for the development server. This plugin is a successor or variant of rollup-plugin-copy, tailored for Vite environments. The vulnerability affects versions >= 0.4.3 and < 2.3.2, as well as >= 3.0.0 and < 3.1.2. The core issue is that files outside the intended source directory (src) can be accessed by an attacker through a specially crafted request that exploits improper limitation of pathnames to restricted directories. Essentially, the plugin fails to adequately sanitize or restrict file paths, allowing traversal outside the designated directory boundaries. This can lead to unauthorized access to files that should not be publicly accessible during development or build processes. The vulnerability has a CVSS 4.0 base score of 6.0, indicating a medium severity level. The vector indicates network attack vector (AV:N), low attack complexity (AC:L), no privileges required (PR:N), but user interaction is required (UI:P). The vulnerability impacts confidentiality (VC:H) but not integrity or availability. No known exploits are currently reported in the wild, and patches fixing the issue are available in versions 2.3.2 and 3.1.2. This vulnerability is particularly relevant to developers and organizations using Vite with this plugin in their build or development environments, as it can expose sensitive files unintentionally during development or testing phases, potentially leaking source code, configuration files, or other sensitive assets.
Potential Impact
For European organizations, the impact of CVE-2025-57753 can be significant, especially for those heavily reliant on modern frontend development frameworks like Vite. Exposure of sensitive files due to path traversal can lead to leakage of intellectual property, source code, environment configurations, or credentials embedded in configuration files. This can facilitate further attacks such as code injection, privilege escalation, or supply chain compromise. Organizations in sectors with strict data protection regulations (e.g., GDPR) may face compliance risks if sensitive personal data or credentials are exposed. The vulnerability primarily affects development and build environments, which might be less hardened than production, increasing the risk of exploitation during development cycles. Additionally, since the vulnerability requires user interaction (e.g., crafted requests), it may be exploited through social engineering or targeted attacks on developers or CI/CD pipelines. The medium severity score reflects a moderate risk, but the potential for cascading effects in software supply chains or development environments is notable.
Mitigation Recommendations
1. Upgrade vite-plugin-static-copy to versions 2.3.2 or 3.1.2 or later, where the vulnerability is fixed. 2. Review and restrict access to development and build servers, ensuring they are not exposed to untrusted networks or users. 3. Implement strict input validation and sanitization for any requests or inputs that interact with file paths in development tools. 4. Use containerization or isolated environments for development to limit the impact of potential file access vulnerabilities. 5. Audit build and deployment pipelines to ensure no sensitive files are inadvertently exposed or included in publicly accessible directories. 6. Educate developers about the risks of path traversal and the importance of using updated dependencies. 7. Monitor network traffic and logs for unusual or crafted requests targeting development servers or build tools. 8. Consider implementing web application firewalls (WAF) or runtime application self-protection (RASP) solutions that can detect and block path traversal attempts.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-08-19T15:16:22.916Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 68a746acad5a09ad00127771
Added to database: 8/21/2025, 4:17:48 PM
Last enriched: 8/21/2025, 4:33:37 PM
Last updated: 8/21/2025, 5:47:48 PM
Views: 4
Related Threats
CVE-2025-7051: CWE-284 in N-able N-central
HighCVE-2025-57768: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Alanaktion phproject
MediumCVE-2025-55524: n/a
UnknownCVE-2025-55523: n/a
UnknownCVE-2025-43754: CWE-208 Observable Timing Discrepancy in Liferay Portal
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.