CVE-2026-41676: rust-openssl: Deriver::derive and PkeyCtxRef::derive can overflow short buffers on OpenSSL 1.1.1

Published Apr 22, 2026
·
Updated

Deriver::derive (and PkeyCtxRef::derive) sets len = buf.len() and passes it as the in/out length to EVPPKEYderive, 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.

Other sources

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

MITRE

Affected Software

2 affected componentsFixes available
rust/openssl>=0.9.27<0.10.78
0.10.78
Rust-openssl Project Rust-openssl Rust>=0.9.27<0.10.78

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rust/openssl to a version that resolves this vulnerability.

    Fixed in 0.10.78
  2. Upgrade

    Upgrade rust-openssl to a version that resolves this vulnerability.

    Fixed in 0.10.78
  3. Compensating control

    If you cannot upgrade to rust-openssl 0.10.78, run systems using OpenSSL 1.1.x (including X25519, X448, DH, and HKDF-extract) with additional input-length validation in the calling code so `Deriver::derive` / `PkeyCtxRef::derive` are never invoked with short buffers.

Event History

Apr 22, 2026
Advisory Published
via GitHub·09:22 PM
Data Sourced
via GitHub·09:22 PM
DescriptionWeaknessAffected Software
Apr 24, 2026
CVE Published
via MITRE·05:16 PM
Data Sourced
via MITRE·05:16 PM
DescriptionWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-41676?

CVE-2026-41676 presents a high severity vulnerability due to its potential to lead to information disclosure.

2

How do I fix CVE-2026-41676?

To fix CVE-2026-41676, update the Rust OpenSSL package to version 0.10.78 or later.

3

Which software versions are affected by CVE-2026-41676?

CVE-2026-41676 affects Rust OpenSSL versions between 0.9.27 and 0.10.78, excluding the latter.

4

What components are involved in CVE-2026-41676?

CVE-2026-41676 involves the Deriver::derive and PkeyCtxRef::derive components in conjunction with OpenSSL functionality.

5

What are the implications of CVE-2026-41676?

The implications of CVE-2026-41676 include the potential leakage of sensitive cryptographic keys, which can compromise security.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203