Swift Crypto 5.0.3: VOPRF blind and evaluate APIs do not enforce the RFC 9497 input length limit (CVE-2026-86983)

Users of Swift Crypto should update to 5.0.3 as soon as practically possible, which addresses the following security issues:

VOPRF blind and evaluate APIs do not enforce the RFC 9497 input length limit (CVE-2026-86983)

A remote attacker may be able to terminate a process that passes attacker-controlled input to the P-384 VOPRF API without bounding its length.

Affected versions: >= 3.10.0, <= 5.0.2

For more details, please read the GitHub Security Advisory: VOPRF blind and evaluate APIs do not enforce the RFC 9497 input length limit · Advisory · apple/swift-crypto · GitHub

Thanks to Karan Kurani for reporting this issue.

@beaumont thank you for that! Are you planning to make patch releases for 3.x.x and 4.x.x? There are some big packages (e.g. GitHub - vapor/vapor at vapor4 · GitHub ) that lock Swift Crypto below v5.

About Vapor 4 specifically, I believe there is no technical reason we can’t simply allow Swift Crypto v5.

If you’d like to submit a PR to the vapor4 branch to simply widen the accepted range in Package.swift, that’d be great, otherwise we can take care of it.

cc @0xTim

Yeah we can widen it, no reason not to. The main issue is that if v4 is vulnerable, bumping to v5 only would be a breaking change and we can't do that

Problem is also postgres-nio and who knows what else is the same. Imho rather than scrambling to migrate all affected packages it would make sense for Swift Crypto to release security patches for all major versions affected.

We haven't historically backported to previous majors because all these majors are almost API backwards compatible and the ecosystem is strongly encouraged to widen their supported versions as described in the README. We also expect future years to not require a new major due to the adoption of nonexhaustive enums in 5.0.

Yeah, you should be able to widen without a breaking change.

Postgres NIO is already updated to accept 5.x AFAICT looking at their package manifest.

We might be able to backport this to 4.x if there's a strong need.

@beaumont Not sure what's the best move here but I do want to mention that there are lots of libraries that are still not on v5. These are only the Apple ones. I had an LLM dig through the repos:

# apple/… · branch Now → proposed swift-crypto after swift package resolve
1 swift-nio-ssh · main "1.0.0"..<"5.0.0" → ..<"6.0.0" 5.0.3
2 swift-nio-oblivious-http · main from: "4.0.0" → "4.0.0"..<"6.0.0"; beta path → ..<"6.0.0-beta.max" 5.0.3
3 swift-cassandra-client · main "3.0.0"..<"5.0.0" → ..<"6.0.0" 5.0.3
4 swift-container-plugin · main "1.0.0"..<"5.0.0" → ..<"6.0.0" 5.0.3
5 containerization · main "3.0.0"..<"5.0.0" → ..<"6.0.0" lockfile 3.15.1; an update reaches only 4.5.2
6 app-store-server-library-swift · main "1.0.0" ..< "4.0.0" → ..< "6.0.0" 4.5.2, held back by jwt-kit 5.7.1 and nio-extras
7 apple-ads-platform-api-swift · main from: "4.0.0" → "4.0.0"..<"6.0.0" 5.0.3
8 swift-homomorphic-encryption · main from: "3.10.0" → "3.10.0"..<"6.0.0" lockfile 3.15.1; an update reaches 5.0.3
9 swift-homomorphic-encryption · release/1.0 from: "3.4.0" → "3.4.0"..<"6.0.0" lockfile 3.5.2; an update reaches 5.0.3
10 swift-homomorphic-encryption · release/1.1 from: "3.10.0" → "3.10.0"..<"6.0.0" lockfile 3.15.1; an update reaches 5.0.3
11 pir-service-example · main from: "3.10.0" → "3.10.0"..<"6.0.0" lockfile 3.15.1; held back until homomorphic-encryption releases
12 pass-builder · main "3.14.0"..<"5.0.0" → ..<"6.0.0" 5.0.3

Any of these in a dependency tree, and you can't get v5 anymore.

So something has to be done. Either update all those, or backport the fix.
Given we have LLMs nowadays, updating all those is an ok option. You can hand this list to your LLM and ask it to make PRs closely following Widened Swift Crypto versions to "1.0.0" ..< "6.0.0" by maciejtrybilo · Pull Request #330 · apple/swift-nio-extras · GitHub or such.

1 Like