feat(lfi): Add detection for Vite.js path traversal (CVE-2025-30208)#4407
Merged
EsadCetiner merged 3 commits intoJan 16, 2026
Merged
Conversation
Add rule 930140 to detect Vite.js /@fs/ and /@id/ endpoints used in path traversal attacks. Includes 7 regression tests. Closes coreruleset#4404
Contributor
|
📊 Quantitative test results for language: |
EsadCetiner
requested changes
Jan 16, 2026
Member
EsadCetiner
left a comment
There was a problem hiding this comment.
Could you add your change to restricted-files.data instead? It's much cheaper performance wise to use the @pmFromFile operator here in one rule, rather than creating another rule with a regex.
Per reviewer feedback, added /@fs/ and /@id/ entries to restricted-files.data instead of creating a separate rule 930140. This leverages the existing @pmFromFile operator for better performance. Tests added to 930130.yaml (test_id 4-6).
6f7c602 to
abc63e6
Compare
Contributor
Author
|
Good point, thanks for the feedback. Updated the PR:
This leverages the existing |
EsadCetiner
requested changes
Jan 16, 2026
Member
EsadCetiner
left a comment
There was a problem hiding this comment.
Thanks, looks ready to merge. Can you add your name to the test file?
Contributor
Author
|
Done, added my name to the test file. Thanks for the quick review! |
EsadCetiner
approved these changes
Jan 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add detection for Vite.js development server path traversal vulnerability (CVE-2025-30208).
Closes #4404
The Problem
Vite.js development servers expose
/@fs/and/@id/endpoints that allow arbitrary file system access. Attackers are actively scanning production servers for these endpoints.Current CRS rule 930130 catches some payloads (like
/@fs/.env) because.envis inrestricted-files.data, but does NOT catch system files like/@fs/etc/passwdbecause rule 930120 only checksARGS, notREQUEST_URI.The Solution
A dedicated rule (930140) matching the
/@fs/and/@id/prefixes provides:Testing
References