# CVE-2026-41677: rust-opennssl has an Out-of-bounds read in PEM password callback when returning an oversized length

Source: https://junglewise.ai/threats/cve-2026-41677-rust-opennssl-has-an-out-of-bounds-read-in-pem-password-callback  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-24. Updated: 2026-05-11  
License: CC BY 4.0 with a link back

CVE-2026-41677 · Severity: critical · CVSS 9.1 · Published 2026-04-24

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 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.

Technologies: [openssl (crates.io)](https://junglewise.ai/threats/technologies/crates-io-openssl), [Rust-Openssl Project Rust-Openssl](https://junglewise.ai/threats/technologies/rust-openssl). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io), [Rust-Openssl Project](https://junglewise.ai/threats/vendors/rust-openssl-project).

## Quick answers

**Is CVE-2026-41677 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-41677 being exploited in the wild.

**How severe is CVE-2026-41677?** Critical severity, with a CVSS score of 9.1, published 24 April 2026.

**Which products and versions are affected?** openssl (crates.io) SEMVER:introduced=0.9.0,fixed=0.10.78.

**Is there a fix for CVE-2026-41677?** Yes. openssl (crates.io): upgrade to 0.10.78 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2026-41677?** Check whether you run openssl (crates.io) or Rust-Openssl Project Rust-Openssl at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- openssl (crates.io): upgrade to 0.10.78 or later

  ```sh
  cargo update -p openssl
  ```


## Affected products

- openssl (crates.io) SEMVER:introduced=0.9.0,fixed=0.10.78
- Rust-Openssl Project Rust-Openssl

## Identifiers

- CVE-2026-41677
- GHSA-xmgf-hq76-4vx2
- RUSTSEC-2026-0479

## References

- [https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-xmgf-hq76-4vx2](https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-xmgf-hq76-4vx2)
- [https://github.com/rust-openssl/rust-openssl/pull/2605](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/commit/5af6895c907773699f37f583f409b862284062b1)
- [https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78](https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78)
- [https://api.github.com/repos/rust-openssl/rust-openssl/security-advisories/GHSA-xmgf-hq76-4vx2](https://api.github.com/repos/rust-openssl/rust-openssl/security-advisories/GHSA-xmgf-hq76-4vx2)

## Related threats

- [rust-openssl heap overflow in CipherCtxRef::cipher_update_inplace](https://junglewise.ai/threats/cve-2026-45784-rust-openssl-heap-overflow-in-cipherctxref-cipher-update-inplace)
- [rust-openssl heap buffer overflow in AES key-wrap-with-padding](https://junglewise.ai/threats/cve-2026-44662-rust-openssl-heap-buffer-overflow-in-aes-key-wrap-with-padding)
- [rust-openssl undefined behavior in X509Ref::ocsp_responders](https://junglewise.ai/threats/cve-2026-42327-rust-openssl-undefined-behavior-in-x509ref-ocsp-responders)
- [rust-openssl buffer over-read in PSK and cookie callbacks](https://junglewise.ai/threats/cve-2026-41898-rust-openssl-buffer-over-read-in-psk-and-cookie-callbacks)
- [rust-openssl stack buffer overflow in MdCtxRef::digest_final](https://junglewise.ai/threats/cve-2026-41681-rust-openssl-stack-buffer-overflow-in-mdctxref-digest-final)
