Byass due to validation before canonicalization in serve
Versions of serve before 6.5.2 are vulnerable to the bypass of the ignore functionality. The bypass is possible because validation happens before canonicalization of paths and filenames.
Example: Here we have a server that ignores the file test.txt.
const serve = require('serve')
const server = serve(__dirname, {
port: 1337,
ignore: ['test.txt']
})
Using the URL encoded form of a letter (%65 instead of e) attacker can bypass the ignore control accessing the file.
curl http://localhost:1337/t%65st.txt
Additionally this technique can be used to get directory listings of ignored directories.
Recommendation
Update to version 6.5.2 or later.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| npm-Paket | serve | < 6.5.2 | 6.5.2 |
Verweise
- Schwäche (CWE)
-- Plattform
- npm
- Paket
serve- Veröffentlicht
- 01.09.2020
- Aktualisiert
- 11.10.2026 10:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-wm7q-rxch-43mx - CC BY 4.0
Schwachstellenhistorie: serve
Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 9
- Erste → letzte
- 07.2018 08.2021
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Hoch 5
- Mittel 4
Veröffentlichungen pro Jahr
- 2018: 2
- 2019: 2
- 2020: 4
- 2021: 1
- 2022: 0
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
Byass due to validation before canonicalization in serve dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.