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.
Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Paczka npm | serve | < 6.5.2 | 6.5.2 |
Odnośniki
- Słabość (CWE)
-- Platforma
- npm
- Paczka
serve- Ujawniono
- 01.09.2020
- Aktualizacja
- 11.10.2026 10:22
Źródła i licencje
OSV / GitHub Advisory Database - GHSA-wm7q-rxch-43mx - CC BY 4.0
Historia podatności: serve
Wszystkie opisane podatności tej paczki (Paczka npm), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
- Wszystkich wpisów
- 9
- Pierwsza → ostatnia
- 07.2018 08.2021
- Bez poprawki
- 0
- Wykorzystywana w atakach
- 0
Rozkład istotności
- Wysoka 5
- Średnia 4
Ujawnienia w latach
- 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 ten wpis
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.