loopbackio / loopbackio/loopback-next
High severity CVEs in the rest component
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 5.1k
- Fork
- 1.1k
- Merge medio
- 2g 21h
- PR unite (30g)
- 27
Descrizione
### Describe the bug
There are several CVEs posted against the version of undici used by the version of openapi that this project is using. As of the past few days some high severity items came in, so this probably should be looked at as its causing audit failures.
CVEs:
Undici has an unbounded decompression chain in HTTP responses on Node.js Fetch API via Content-Encoding leads to resource exhaustion - https://github.com/advisories/GHSA-g9mf-h72j-4rw9
Undici has an HTTP Request/Response Smuggling issue - https://github.com/advisories/GHSA-2mjp-6q6p-2qxm
Undici has Unbounded Memory Consumption in WebSocket permessage-deflate Decompression - https://github.com/advisories/GHSA-vrm6-8vpv-qv8q
Undici has Unhandled Exception in WebSocket Client Due to Invalid server_max_window_bits Validation - https://github.com/advisories/GHSA-v9p9-hfj2-hcw8
Undici has CRLF Injection in undici via `upgrade` option - https://github.com/advisories/GHSA-4992-7rv2-5pvq
I am not sure what a good fix is here because the @openapi-contrib/openapi-schema-to-json-schema package that rest is relying on hasn't been updated in 3 years, so it is probably no longer maintained.
### Logs
```shell
undici <=6.23.0
Severity: high
Undici has an unbounded decompression chain in HTTP responses on Node.js Fetch API via Content-Encoding leads to resource exhaustion - https://github.com/advisories/GHSA-g9mf-h72j-4rw9
Undici has an HTTP Request/Response Smuggling issue - https://github.com/advisories/GHSA-2mjp-6q6p-2qxm
Undici has Unbounded Memory Consumption in WebSocket permessage-deflate Decompression - https://github.com/advisories/GHSA-vrm6-8vpv-qv8q
Undici has Unhandled Exception in WebSocket Client Due to Invalid server_max_window_bits Validation - https://github.com/advisories/GHSA-v9p9-hfj2-hcw8
Undici has CRLF Injection in undici via `upgrade` option - https://github.com/advisories/GHSA-4992-7rv2-5pvq
fix available via `npm audit fix --force`
Will install @loopback/rest@7.0.1, which is a breaking change
node_modules/undici
openapi-typescript 5.1.1 - 6.7.6
Depends on vulnerable versions of undici
node_modules/openapi-typescript
@openapi-contrib/openapi-schema-to-json-schema >=4.0.1
Depends on vulnerable versions of openapi-typescript
node_modules/@openapi-contrib/openapi-schema-to-json-schema
@loopback/rest >=13.1.1
Depends on vulnerable versions of @openapi-contrib/openapi-schema-to-json-schema
node_modules/@loopback/rest
```
### Additional information
_No response_
### Reproduction
n/a
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
La issue cita @loopback/rest, @openapi-contrib/openapi-schema-to-json-schema, openapi-typescript e undici; inizia tracciando questa catena di dipendenze npm ed eseguendo l’audit segnalato. Il lavoro è completato quando gli avvisi elencati con gravità elevata sono stati risolti senza dipendere dall’aggiornamento incompatibile indicato a @loopback/rest@7.0.1.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- nodejs, openapi, typescript
- Ambito
- api, backend, security
- Tipo di issue
- Bug
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100