High severity CVEs in the rest component
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- nodejs, openapi, typescript
Research direction
The issue names @loopback/rest, @openapi-contrib/openapi-schema-to-json-schema, openapi-typescript, and undici; start by tracing that npm dependency chain and running the reported audit. Done means the listed high-severity advisories are addressed without relying on the stated breaking upgrade to @loopback/rest@7.0.1.
Written by the indexing model from the issue text.
Description
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
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
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1.1k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 34
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from loopbackio/loopback-next
-
Docs good first issue help wanted
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
loopbackio/loopback-next#683 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
loopbackio/loopback-next#11726 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
loopbackio/loopback-next#11412 · 1 comment ·
-
bug help wanted
Difficulty 3/5 1-2 days Newbie friendliness 45/100
loopbackio/loopback-next#11396 · 2 comments · 1 reaction ·
-
bug help wanted
Difficulty 3/5 1-2 days Newbie friendliness 48/100
loopbackio/loopback-next#11363 · 3 comments ·
All issues in loopbackio/loopback-next
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ontola/atomic-server#1625 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
melgarafael/DeskcommCRM#1451 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·