CVE-2026-45784

rust-openssl: Potential out-of-bounds write in `CipherCtxRef::cipher_update_inplace` for AES-KW-PAD ciphers

Published Jul 17, 2026 CVSS 4.0 · 5.1 Medium EPSS < 1% KEV · Not listed
Description
rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.10.50 until 0.10.80, CipherCtxRef::cipher_update_inplace in openssl/src/cipher_ctx.rs incorrectly sized output buffers when used with AES key-wrap-with-padding ciphers EVP_aes_{128,192,256}_wrap_pad. For a non-multiple-of-8 input, OpenSSL writes up to 7 bytes past the end of the caller's buffer or Vec, producing attacker-controllable heap corruption when the plaintext length is attacker-influenced. This issue is fixed in version 0.10.80.

Analysis

AI-generated

Technical impact

The vulnerability arises from CipherCtxRef::cipher_update_inplace in rust‑openssl incorrectly sizing output buffers for AES key‑wrap‑with‑padding ciphers. When the plaintext is not a multiple of eight, OpenSSL copies up to seven bytes past the end of the caller’s buffer or Vec, producing attacker‑controlled heap corruption when the plaintext length is attacker‑influenced. This flaw manifests as a classic buffer overflow and integer overflow error (CWE‑131, CWE‑787).

Affected Systems

The affected product is the Rust OpenSSL bindings crate rust‑openssl. Versions from 0.10.50 up through 0.10.79 contain the flaw; the issue is fixed in version 0.10.80 and later.

Risk and Exploitability

The CVSS score of 5.1 indicates moderate severity, while an EPSS score of less than 1% suggests a low probability of exploitation at this time. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is a local compromise where an application that uses the vulnerable AES key‑wrap‑with‑padding cipher operations can supply attacker‑controlled plaintext. Because the flaw is a heap out‑of‑bounds write, successful exploitation could achieve arbitrary code execution if the attacker can manipulate the memory layout, but such exploitation requires precise conditions and is therefore considered less likely.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the rust‑openssl crate to version 0.10.80 or newer, which includes the buffer‑size fix.
  • If an upgrade is not immediately possible, avoid invoking AES key‑wrap‑with‑padding ciphers with plaintext lengths that are not multiples of eight, or implement defensive code that guarantees the caller’s output buffer is sized at least input length plus seven bytes before calling cipher_update_inplace.
  • Apply a temporary patch in the application code to validate or adjust buffer sizes around the cryptographic call, ensuring that an overflow cannot occur even if an attacker supplies a malicious plaintext length.

Generated by OpenCVE AI on July 30, 2026 at 23:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-phqj-4mhp-q6mq rust-openssl: Potential out-of-bounds write in `CipherCtxRef::cipher_update_inplace` for AES-KW-PAD ciphers
History
Type Values Removed Values Added
First Time appeared Rust-openssl Project
Rust-openssl Project rust-openssl
Vendors & Products Rust-openssl Project
Rust-openssl Project rust-openssl
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L'}

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.10.50 until 0.10.80, CipherCtxRef::cipher_update_inplace in openssl/src/cipher_ctx.rs incorrectly sized output buffers when used with AES key-wrap-with-padding ciphers EVP_aes_{128,192,256}_wrap_pad. For a non-multiple-of-8 input, OpenSSL writes up to 7 bytes past the end of the caller's buffer or Vec, producing attacker-controllable heap corruption when the plaintext length is attacker-influenced. This issue is fixed in version 0.10.80.
Title rust-openssl: Potential out-of-bounds write in `CipherCtxRef::cipher_update_inplace` for AES-KW-PAD ciphers
Weaknesses CWE-131
CWE-787
References
Metrics cvssV4_0

{'score': 5.1, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-131

    Incorrect Calculation of Buffer Size

  • CWE-787

    Out-of-bounds Write

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 20, 2026, 1:49 PM
Reserved
May 13, 2026, 7:45 AM
Status
Analyzed
Published
Jul 17, 2026, 9:17 PM
Modified
Jul 29, 2026, 3:43 PM
Severity
Moderate
Public date
Jul 17, 2026, 8:26 PM