Skip to content

Fix possible fix(deps): 2 vulnerable dependencies in Package.resolved - #114

Open
begininvoke wants to merge 1 commit into
CocoaHeadsConference:developfrom
begininvoke:redgem/security-fix-c5860724
Open

Fix possible fix(deps): 2 vulnerable dependencies in Package.resolved#114
begininvoke wants to merge 1 commit into
CocoaHeadsConference:developfrom
begininvoke:redgem/security-fix-c5860724

Conversation

@begininvoke

Copy link
Copy Markdown

This changes CocoaHeads.xcworkspace/xcshareddata/swiftpm/Package.resolved to address something a scan flagged. It is around line 237.

The HTTPDecoder in NIOHTTP1 only limited individual header field size (80 KB) but imposed no overall cap on the header block size or the number of headers. An attacker can send many small, valid headers, which are accumulated into the HTTPHeaders object before any application code runs. This can exhaust process memory or crash downstream frameworks (e.g., Hummingbird 2) that convert headers to HTTPFields. The vulnerability is a high‑severity denial‑of‑service issue. The fix is to upgrade swift‑nio to version 2.100.0 or later, which introduces NIOHTTPDecoderLimitConfiguration. This configuration provides conservative defaults (maxHeaderFieldSize = 80 KB, maxHeaderListSize = 2 MB, maxHeaderFieldCount = 256). Exceeding any limit causes the decoder to fail with HTTPParserError.headerOverflow. Users should also explicitly set decoderConfiguration where appropriate to enforce these limits.

Upgrade swift‑nio to version 2.100.0 to address CVE‑2026‑2980 and CVE‑2026‑2843671.

For reference: rule CVE-2026-28980. Rated high.

I may well be missing context here — if the current code is deliberate, feel free to close this.


Found with automated scanning (RedGem) and reviewed before opening. If it is not useful, closing it is completely fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant