Skip to content

Upgrade swift-nio to 2.100.0+ to fix Dependabot security alerts - #11

Merged
liuxuan30 merged 1 commit into
masterfrom
chore/upgrade-swift-nio-2.100
Jun 23, 2026
Merged

Upgrade swift-nio to 2.100.0+ to fix Dependabot security alerts#11
liuxuan30 merged 1 commit into
masterfrom
chore/upgrade-swift-nio-2.100

Conversation

@liuxuan30

Copy link
Copy Markdown
Owner

Summary

Upgrades the swift-nio dependency to resolve all open Dependabot security alerts on the default branch. GitHub reports 6 vulnerabilities (4 high, 2 moderate) coming from swift-nio — this PR addresses all of them with a single dependency bump.

What changed

  • Package.swift: bumped the swift-nio requirement from from: "2.13.1" to from: "2.100.0".
  • Package.resolved (root): regenerated — swift-nio now pinned to 2.101.0 (was 2.10.1). Transitive deps resolved: swift-atomics 1.3.0, swift-collections 1.6.0, swift-system 1.7.2.
  • TelloSwift.xcodeproj/.../Package.resolved: synced to the same versions (was 2.54.0) and added the new transitive swift-system pin.

Vulnerabilities resolved

All of the following swift-nio advisories are patched in 2.100.0, so the upgrade to 2.101.0 closes every open Dependabot alert:

CVE Severity Summary
CVE-2026-43671 High ByteBuffer index/length UInt32 overflow → out-of-bounds write (GHSA-r3rc-9hpw-54v9)
CVE-2026-28980 High NIOHTTP1 HTTPDecoder accepts unbounded HTTP/1 header blocks → remote DoS (GHSA-rj37-6j9x-74q6)
CVE-2026-28970 Moderate CRLF injection in outbound HTTP request URI via NIOHTTPRequestHeadersValidator (GHSA-cq87-8r7h-962v)
CVE-2022-3215 Moderate HTTP response splitting / CRLF in HTTP headers (GHSA-7fj7-39wj-c64f)

The Dependabot alert email lists these under dependency github.com/apple/swift-nio, affected range >= 2.0.0 <= 2.99.0, upgrade target ~> 2.100.0 — exactly what this PR does.

Source compatibility

No Swift source changes were needed. All NIO APIs used by TelloSwift remain compatible in 2.101.0:

  • DatagramBootstrap, MultiThreadedEventLoopGroup
  • ChannelOptions.socket(SocketOptionLevel(SOL_SOCKET), SO_REUSEADDR)
  • CircularBuffer, AddressedEnvelope<ByteBuffer>
  • Channel.close(mode: .all, promise: nil)
  • channel.pipeline.handler(type:) / channel.pipeline.addHandler

swift-tools-version is left at 5.1 to keep backward compatibility with older Xcode/toolchains; the manifest itself does not require a higher version.

Verification

Built and tested locally with Swift 6.1.2 on Linux (the toolchain required because swift-nio 2.100.0's own Package.swift declares swift-tools-version:6.1):

  • swift build — succeeds, no warnings.
  • swift test44 tests, 0 failures.
Test Suite 'All tests' passed
 Executed 44 tests, with 0 failures (0 unexpected) in 9.397 seconds

Conversation: https://app.warp.dev/conversation/94f5e12b-8bd5-4e83-a963-00c89b94d3ea
Run: https://oz.warp.dev/runs/019ef2b7-d35d-78a9-858c-5d8c37ee3192

This PR was generated with Oz.

Bump the swift-nio dependency requirement from "2.13.1" to "2.100.0"
and regenerate the lockfiles. The root Package.resolved was pinned to
swift-nio 2.10.1, which is affected by all open Dependabot alerts.
Resolved version is now 2.101.0 (within ~> 2.100.0).

This resolves the following swift-nio security advisories, all patched
in 2.100.0:
- CVE-2026-43671 (High): ByteBuffer index/length UInt32 overflow,
  out-of-bounds write (GHSA-r3rc-9hpw-54v9)
- CVE-2026-28980 (High): NIOHTTP1 HTTPDecoder unbounded HTTP/1 header
  blocks, remote DoS (GHSA-rj37-6j9x-74q6)
- CVE-2026-28970 (Moderate): CRLF injection in outbound HTTP request
  URI via NIOHTTPRequestHeadersValidator (GHSA-cq87-8r7h-962v)
- CVE-2022-3215 (Moderate): HTTP response splitting / CRLF in HTTP
  headers (GHSA-7fj7-39wj-c64f)

No source changes were required: all NIO APIs used by TelloSwift
(DatagramBootstrap, ChannelOptions.socket, CircularBuffer,
AddressedEnvelope<ByteBuffer>, Channel.close(mode:promise:),
channel.pipeline.handler) remain compatible. Synced the Xcode
project's Package.resolved to the same versions and added the new
transitive swift-system dependency.

Verified with Swift 6.1.2: `swift build` succeeds and `swift test`
passes all 44 tests with 0 failures.

Co-Authored-By: Oz <oz-agent@warp.dev>
@liuxuan30
liuxuan30 marked this pull request as ready for review June 23, 2026 06:20
Copilot AI review requested due to automatic review settings June 23, 2026 06:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the project’s SwiftNIO dependency to a patched 2.100.0+ release line (resolved to 2.101.0) in order to address Dependabot security alerts, updating both SwiftPM and Xcode workspace lockfiles to the new resolved dependency graph.

Changes:

  • Bump swift-nio requirement in Package.swift from 2.13.1 to 2.100.0.
  • Regenerate root Package.resolved, pinning swift-nio to 2.101.0 and adding updated transitive pins (swift-atomics, swift-collections, swift-system).
  • Sync the Xcode workspace SwiftPM Package.resolved to the same set of pins/versions.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
Package.swift Updates the SwiftPM dependency requirement for swift-nio to from: "2.100.0".
Package.resolved Updates SwiftPM lockfile pins to swift-nio 2.101.0 and refreshed transitives.
TelloSwift.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved Aligns Xcode workspace lockfile pins with the updated dependency versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Package.swift
Comment thread Package.swift
@liuxuan30
liuxuan30 merged commit 40ad0ab into master Jun 23, 2026
2 checks passed
@liuxuan30
liuxuan30 deleted the chore/upgrade-swift-nio-2.100 branch June 23, 2026 06:28
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.

2 participants