rust-openssl: Out-of-bounds read in PEM password callback when user callback returns an oversized length
cve-program · CVE-2026-41677
Publishedrust-openssl provides OpenSSL bindings for the Rust programming language. From 0.9.0 to before 0.10.78, the *_from_pem_callback APIs did not validate the length returned by the user's callback. A password callback that returns a value larger than the buffer it was given can cause some versions of OpenSSL to over-read this buffer. OpenSSL 3.x is not affected by this. This vulnerability is fixed in 0.10.78.
Read the publisher's advisoryeuvd · EUVD-2026-25583
Publishedrust-openssl provides OpenSSL bindings for the Rust programming language. From 0.9.0 to before 0.10.78, the *_from_pem_callback APIs did not validate the length returned by the user's callback. A password callback that returns a value larger than the buffer it was given can cause some versions of OpenSSL to over-read this buffer. OpenSSL 3.x is not affected by this. This vulnerability is fixed in 0.10.78.
Read the publisher's advisorynvd · CVE-2026-41677
Publishedrust-openssl provides OpenSSL bindings for the Rust programming language. From 0.9.0 to before 0.10.78, the *_from_pem_callback APIs did not validate the length returned by the user's callback. A password callback that returns a value larger than the buffer it was given can cause some versions of OpenSSL to over-read this buffer. OpenSSL 3.x is not affected by this. This vulnerability is fixed in 0.10.78.
Read the publisher's advisoryosv · GHSA-xmgf-hq76-4vx2
PublishedThe `*_from_pem_callback` APIs did not validate the length returned by the user's callback. A password callback that returns a value larger than the buffer it was given can cause some versions of OpenSSL to over-read this buffer. OpenSSL 3.x is not affected by this.
Read the publisher's advisoryosv · RUSTSEC-2026-0479
PublishedThe `*_from_pem_callback` functions, such as `EcKey::private_key_from_pem_callback`, pass the length returned by the user's password callback to OpenSSL without checking it against the size of the buffer the callback was given. If the callback reports more bytes than the buffer holds, some OpenSSL versions read past the end of the buffer while deriving the decryption key. OpenSSL 3.x is not affected. 0.10.78 treats a returned length larger than the buffer as a failed callback.
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2026-41677 · CVE overview and exploitation status
cve-program · CVE-2026-41677
euvd · EUVD-2026-25583
nvd · CVE-2026-41677
osv · GHSA-xmgf-hq76-4vx2
- https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-xmgf-hq76-4vx2
- https://nvd.nist.gov/vuln/detail/CVE-2026-41677
- https://github.com/rust-openssl/rust-openssl/pull/2605
- https://github.com/rust-openssl/rust-openssl/commit/5af6895c907773699f37f583f409b862284062b1
- https://github.com/rust-openssl/rust-openssl
- https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78
osv · RUSTSEC-2026-0479
Related changes
Linked by CVE identifier- rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.9.0 to before 0.10.78, the *_from_pem_callback APIs did not validate the length returned by the user's callback. A password callback that returns a value larg… · Advisory content revised · 15 Nov 2026
- Out-of-bounds read when a PEM password callback returns an oversized length · Newly collected advisory · 10 Nov 2026
- rust-opennssl has an Out-of-bounds read in PEM password callback when returning an oversized length · Advisory content revised · 10 Nov 2026