1.7low
rust-openssl: Out-of-bounds read in PEM password callback when user callback returns an oversized length
- Severity
- 1.7low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.30% (higher than 25% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-xmgf-hq76-4vx2RUSTSEC-2026-0479
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| rust-openssl rust-openssl | >= 0.9.0, < 0.10.78 | CVE List |
| openssl (crates.io) | from 0.9.0 before 0.10.78 | GitHub Advisory Database, RustSec Advisory Database |
| rust-openssl_project rust-openssl | from 0.9.0 before 0.10.78 | NVD |
All scores
| GitHub_M | 1.7low CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N/E:U |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N/E:U |
| NVD | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
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.
RustSec Advisory Database
The *_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.
NVD (es)
rust-openssl proporciona enlaces de OpenSSL para el lenguaje de programación Rust. Desde la versión 0.9.0 hasta antes de la 0.10.78, las API *_from_pem_callback no validaban la longitud devuelta por la función de callback del usuario. Una función de callback de contraseña que devuelve un valor mayor que el búfer que se le proporcionó puede hacer que algunas versiones de OpenSSL sobrelean este búfer. OpenSSL 3.x no se ve afectado por esto. Esta vulnerabilidad está corregida en la versión 0.10.78.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-41677 changed 2026-04-24 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xmgf-hq76-4vx2 changed 2026-11-10 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2026-0479 changed 2026-11-10 | CC0-1.0 |
| NVD | CVE-2026-41677 changed 2026-11-11 | Public domain |