☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
rust-openssl logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 1.7 🐛 CWE-125
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-41677

CVE-2026-41677 is a buffer over-read vulnerability in the `rust-openssl` crate, which provides OpenSSL bindings for the Rust programming language.
📅 PUBLISHED: 2026-04-24 18:16 UTC 🔄 UPDATED: 2026-09-23 20:37 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.29%
👁️
0.29% probability
7.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1499
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Affected: < 0.10.78 — upgrade to patched release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
1.7
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-41677 is a buffer over-read vulnerability in the rust-openssl crate, which provides OpenSSL bindings for the Rust programming language. The flaw exists in the *_from_pem_callback APIs (versions 0.9.0 to before 0.10.78). These APIs allow a user-supplied password callback to return a length value that exceeds the actual buffer size. When this occurs, certain versions of OpenSSL (specifically OpenSSL 1.x and 2.x) will over-read the buffer, potentially leaking sensitive memory contents. OpenSSL 3.x is not affected by this specific over-read behavior. The vulnerability is fixed in rust-openssl version 0.10.78, which now validates the length returned by the callback.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the Rust ecosystem via the rust-openssl crate (crates.io). Any application or library that uses rust-openssl versions 0.9.0 through 0.10.77 and relies on the *_from_pem_callback APIs is at risk. The supply chain impact is significant because rust-openssl is a foundational crate used by thousands of Rust projects for TLS/SSL functionality. An attacker who can control the password callback (e.g., through a malicious dependency or compromised build environment) could trigger the buffer over-read, leading to information disclosure.

CVSS Breakdown & Threat Level

The CVSS score is 0.0 (UNKNOWN) due to insufficient data from the NVD. However, based on the technical details, a reasonable assessment would be:

  • Attack Vector (AV): Local (L) – The attacker needs to influence the password callback, which is typically a local operation.
  • Attack Complexity (AC): Low (L) – The callback can be easily manipulated to return a large length.
  • Privileges Required (PR): Low (L) – The attacker may need to control a dependency or have local access.
  • User Interaction (UI): None (N) – No user interaction required beyond the callback execution.
  • Scope (S): Unchanged (U) – The vulnerability does not cross trust boundaries.
  • Confidentiality (C): High (H) – Memory contents can be leaked.
  • Integrity (I): None (N) – No data modification.
  • Availability (A): None (N) – No denial of service.

Estimated CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N Estimated Base Score: 5.5 (Medium)

Threat Level: Medium. The vulnerability requires local access or control over a dependency, but the potential for memory disclosure is serious.

Deep Dive & Mechanics

The rust-openssl crate provides safe Rust bindings to the OpenSSL C library. The *_from_pem_callback functions (e.g., PKey::private_key_from_pem_callback, X509::from_pem_callback) allow users to provide a password callback that returns a password string. The callback is expected to write the password into a provided buffer and return the length of the password.

The vulnerability arises because the callback can return a length that is larger than the buffer size. In OpenSSL versions prior to 3.x, the internal OpenSSL code does not validate that the returned length is within bounds. Consequently, OpenSSL will read beyond the buffer, potentially accessing adjacent memory. This can leak sensitive data such as cryptographic keys, passwords, or other application data.

The fix in rust-openssl 0.10.78 adds a check: after the callback returns, the crate verifies that the returned length does not exceed the buffer size. If it does, the operation is aborted with an error.

Vulnerable vs. Patched Code

Vulnerable Code (simplified, pre-0.10.78):

// In rust-openssl, the callback is called like this:
let len = callback(password_buffer.as_mut_ptr(), password_buffer.len());
// No validation of len against buffer size
// OpenSSL then reads len bytes from password_buffer

Patched Code (0.10.78):

// After callback returns:
let len = callback(password_buffer.as_mut_ptr(), password_buffer.len());
if len > password_buffer.len() {
    return Err(Error::new(ErrorCode::PASSWORD_CALLBACK_ERROR));
}
// Now safe to use len

The patch ensures that the length returned by the callback is within the buffer bounds, preventing the over-read.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • A Rust application using rust-openssl version < 0.10.78.
  • Ability to influence the password callback (e.g., through a malicious dependency or direct code injection).
  • OpenSSL 1.x or 2.x (OpenSSL 3.x is not vulnerable).

Exploitation Steps:

  1. Identify a target application that uses rust-openssl and calls a *_from_pem_callback function.
  2. Modify the password callback to return a length larger than the buffer (e.g., return buffer.len() + 100).
  3. The callback can write a small password into the buffer, but return a large length.
  4. OpenSSL will then read buffer.len() + 100 bytes from the buffer, leaking adjacent memory.
  5. Capture the leaked data (e.g., via a side channel or by observing the application's behavior).

Example malicious callback (Rust):

fn malicious_callback(password: &mut [u8]) -> usize {
    // Write a short password
    password[..5].copy_from_slice(b"hello");
    // Return a length larger than the buffer
    password.len() + 100
}

Note: No public exploit code is available for this CVE.

Blue Team (Defense & Detection)

Detection:

  • Monitor for unusual password callback behavior in Rust applications.
  • Use static analysis to detect use of *_from_pem_callback functions with untrusted callbacks.
  • Enable OpenSSL 3.x if possible, as it is not affected.

Mitigation:

  • Update rust-openssl to version 0.10.78 or later.
  • If updating is not possible, avoid using the *_from_pem_callback APIs with untrusted callbacks.
  • Use OpenSSL 3.x, which is not vulnerable to this over-read.

Indicators of Compromise (IOCs)

  • Library Version: rust-openssl versions 0.9.0 to 0.10.77.
  • OpenSSL Version: OpenSSL 1.x or 2.x (3.x not affected).
  • Behavior: Application crashes or memory leaks when using password-protected PEM files with custom callbacks.
  • Logs: Error messages related to password callback failures or buffer over-reads.

Detection Engineering

YARA Rule

rule CVE_2026_41677_rust_openssl {
    meta:
        description = "Detects vulnerable rust-openssl versions (0.9.0 to 0.10.77)"
        author = "Valters IT"
        date = "2026-01-01"
        cve = "CVE-2026-41677"
    strings:
        $vuln_func = /from_pem_callback/
        $version_str = /version = "0\.(9|10\.[0-7][0-9]?)"/
    condition:
        $vuln_func and $version_str
}

Sigma Rule

title: CVE-2026-41677 - Rust-openssl Buffer Over-read
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential exploitation of CVE-2026-41677 via abnormal password callback lengths
author: Valters IT
logsource:
    product: rust
    service: application
detection:
    selection:
        EventID: 1001
        CallbackReturnLength|gt: 1024
    condition: selection
falsepositives:
    - Legitimate large passwords (unlikely)
level: high

Suricata Rule

alert tcp any any -> any any (msg:"CVE-2026-41677 - Rust-openssl Buffer Over-read Attempt"; flow:to_server; content:"|66 72 6f 6d 5f 70 65 6d 5f 63 61 6c 6c 62 61 63 6b|"; distance:0; within:100; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Update rust-openssl to version 0.10.78 or later.
  2. If using OpenSSL 1.x or 2.x, consider upgrading to OpenSSL 3.x.
  3. Review all uses of *_from_pem_callback APIs and ensure callbacks are trusted.

Long-term Measures:

  • Implement static analysis in CI/CD to detect vulnerable API usage.
  • Use memory-safe languages and libraries where possible.
  • Monitor for CVEs in dependencies using tools like cargo audit.

Patch Details:

  • Fixed Version: rust-openssl 0.10.78
  • Patch Commit: (Not publicly available, but the fix is in the crate's repository)
  • Workaround: Avoid using *_from_pem_callback with untrusted callbacks.

Valters IT Signature:
This report was generated by Valters IT DevSecOps AI. All information is provided for authorized security testing and defense purposes only.

{/* [Security Hash: 6D3AE416ED02F64A64E9F0E3] */}

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-41677/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.