CVE-2026-41677
JSON

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 packageVersionsReported by
rust-openssl rust-openssl>= 0.9.0, < 0.10.78CVE List
openssl (crates.io)from 0.9.0 before 0.10.78GitHub Advisory Database, RustSec Advisory Database
rust-openssl_project rust-opensslfrom 0.9.0 before 0.10.78NVD

All scores

GitHub_M1.7low CVSS:4.0CVSS: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
GitHublow CVSS:4.0CVSS: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
NVD9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

Classification

CWE-125CWE-1284

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

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

SourceRecordLicence
CVE ListCVE-2026-41677 changed 2026-04-24CVE Terms of Use
GitHub Advisory DatabaseGHSA-xmgf-hq76-4vx2 changed 2026-11-10CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2026-0479 changed 2026-11-10CC0-1.0
NVDCVE-2026-41677 changed 2026-11-11Public domain