rust-openssl: Deriver::derive and PkeyCtxRef::derive can overflow short buffers on OpenSSL 1.1.1
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-131 and the CVSS impact.
Summary
rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.9.27 to before 0.10.78, Deriver::derive (and PkeyCtxRef::derive) sets len = buf.len() and passes it as the in/out length to EVP_PKEY_derive, relying on OpenSSL to honor it. On OpenSSL 1.1.x, X25519, X448, DH and HKDF-extract ignore the incoming *keylen, unconditionally writing the full shared secret (32/56/prime-size bytes). A caller passing a short slice gets a heap/stack overflow from safe code. OpenSSL 3.x providers do check, so this only impacts older OpenSSL. This vulnerability is fixed in 0.10.78.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| rust-openssl | rust-openssl | 0.9.27 to before 0.10.78 | 0.10.78 | Patch available | CNA |
| — | openssl (crates.io) | 0.9.27 to before 0.10.78 | 0.10.78 | Patch available | GHSA-pqf5-4pqq-29f5 |
- rust-openssl Vendorrust-openssl Affected 0.9.27 to before 0.10.78 Fixed in 0.10.78 Patch available CNA
- openssl (crates.io) Vendor— Affected 0.9.27 to before 0.10.78 Fixed in 0.10.78 Patch available GHSA-pqf5-4pqq-29f5
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:rust-openssl_project:rust-openssl:*:*:*:*:*:rust:*:* | 0.9.27 to before 0.10.78 | Vulnerable | rust-openssl |
- cpe:2.3:a:rust-openssl_project:rust-openssl:*:*:*:*:*:rust:*:* Versions 0.9.27 to before 0.10.78 Vulnerable ·rust-openssl
Remediation
- Fix · CNA rust-openssl (rust-openssl) Fixed in 0.10.78
- Fix · GHSA-pqf5-4pqq-29f5 openssl (crates.io) Fixed in 0.10.78 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2026-41676
- 2026-10-03 Alias added: GHSA-pqf5-4pqq-29f5
References
Advisory 2
More Rust-openssl vulnerabilities
- TI-2018-14959 An issue was discovered in the openssl crate before 0.10.9 for Rust. CVSS 3.0CRITICAL 9.8
- TI-2026-30198 rust-openssl: MdCtxRef::digest_final() writes past caller buffer with no length check CVSS 4.0HIGH 8.1
- TI-2016-08969 An issue was discovered in the openssl crate before 0.9.0 for Rust. CVSS 3.0HIGH 8.1
- TI-2026-30300 rust-openssl: Unchecked callback-returned length in PSK and cookie generate trampolines… CVSS 4.0HIGH 8.3
- TI-2026-30195 rust-openssl: Incorrect bounds assertion in aes key wrap CVSS 4.0HIGH 7.2
- TI-2026-30194 rust-openssl: Out-of-bounds read in PEM password callback when user callback returns an oversized length CVSS 4.0LOW 1.7
Sources
- CVE-2026-41676 · CVE Program
- CVE-2026-41676 · NVD
- FIRST EPSS
- GHSA-pqf5-4pqq-29f5 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-41676 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences