Note: 4.5.1 has been available since 2026-07-16; if you have already updated, no action is needed.
Users of Swift Crypto should update to 4.5.1 as soon as practically possible, which addresses the following security issue:
When initializing an RSA public key from DER or PEM bytes fails, the underlying EVP_PKEY is freed twice: once in the catch block and again in deinit. This can crash the process on a subsequent memory allocation. Applications that parse untrusted RSA keys with _RSA.Signing.PublicKey, _RSA.Encryption.PublicKey, or _RSA.BlindSigning.PublicKey are affected.
Affected versions: >= 3.2.0, <= 4.5.0
For more details, please read the GitHub Security Advisory: Double-free when parsing RSA public key fails · Advisory · apple/swift-crypto · GitHub
Thanks to Sujal Tuladhar for reporting this issue.