CVE-2025-46674
Executive Summary
CVE-2025-46674 affects NASA's CryptoLib library prior to version 1.3.2. The vulnerability stems from the inclusion of "Extended Procedures" that are explicitly documented as a Work in Progress (WIP) and not intended for flight use. These procedures can potentially act as a keystream oracle, allowing an attacker with local access to the system to leak keystream data. The CVSS score is 3.5 (Low), and the EPSS score is 0.0%, indicating very low exploitation likelihood. No public proof-of-concept or exploit code is available. The primary risk is to systems where CryptoLib is used in non-flight or test environments where these WIP procedures remain enabled.
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.
No signup required
Supply Chain & Package Security
This is a C library used in embedded and aerospace systems. It is not distributed via NPM, PyPI, Go, or Ruby registries. The primary supply chain risk is the use of unpatched versions in critical infrastructure or satellite systems.
CVSS Breakdown & Threat Level
- CVSS Score: 3.5 (Low)
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Attack Vector: Local (AV:L) – requires physical or logical access to the system.
- Attack Complexity: Low (AC:L) – no special conditions required.
- Privileges Required: None (PR:N) – no authentication needed.
- User Interaction: None (UI:N) – no user action required.
- Scope: Unchanged (S:U) – vulnerability does not affect other components.
- Confidentiality Impact: Low (C:L) – limited keystream leakage.
- Integrity Impact: None (I:N) – no data modification.
- Availability Impact: None (A:N) – no denial of service.
Threat Level: Low. The vulnerability requires local access and only leaks keystream data, which may not directly compromise encrypted communications if the keystream is used correctly.
Deep Dive & Mechanics
NASA CryptoLib is a cryptographic library designed for spaceflight applications. The "Extended Procedures" are additional cryptographic functions that are not part of the core, flight-qualified API. They are explicitly marked as a Work in Progress (WIP) and are not intended for use during flight.
The vulnerability arises because these WIP procedures may not properly manage keystream state. Specifically, they can be used to generate keystream output without proper initialization or reset, effectively creating a keystream oracle. An attacker with local access can call these procedures to obtain keystream data that should remain secret. This keystream could then be used to decrypt or forge messages if the same keystream is reused elsewhere.
The root cause is the inclusion of development-stage code in the production library without adequate safeguards (e.g., compile-time flags, runtime checks, or documentation warnings). The fix in version 1.3.2 removes or disables these WIP procedures.
Vulnerable vs. Patched Code
Vulnerable (pre-1.3.2):
// crypto_extended.c (WIP)
void crypto_extended_generate_keystream(uint8_t *output, size_t len) {
// WIP: No proper state management
// Directly exposes internal keystream
for (size_t i = 0; i < len; i++) {
output[i] = internal_keystream[i];
}
}
Patched (1.3.2+):
// crypto_extended.c (REMOVED)
// The entire file is removed or replaced with a stub that returns an error.
int crypto_extended_generate_keystream(uint8_t *output, size_t len) {
return -1; // Not supported
}
The patched version either removes the WIP functions entirely or makes them return an error, preventing any keystream leakage.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Local access to a system running CryptoLib < 1.3.2.
- Ability to call the
crypto_extended_generate_keystreamfunction (e.g., via a debugger, custom binary, or library injection).
Exploitation Steps:
- Identify the target system and confirm CryptoLib version.
- Use a debugger (e.g., GDB) or a custom program to call the vulnerable function:
#include <stdio.h> #include <stdint.h> #include "crypto_extended.h" int main() { uint8_t keystream[32]; crypto_extended_generate_keystream(keystream, 32); for (int i = 0; i < 32; i++) { printf("%02x", keystream[i]); } printf("\n"); return 0; } - Compile and run on the target system.
- Capture the keystream output for further cryptanalysis.
Expected Outcome: Leaked keystream bytes that can be used to decrypt or forge messages if the same keystream is reused.
Blue Team (Defensive)
Detection:
- Monitor for calls to
crypto_extended_generate_keystreamor other WIP functions. - Use runtime integrity checks to detect unauthorized library usage.
- Implement application whitelisting to prevent execution of untrusted binaries.
Prevention:
- Upgrade to CryptoLib 1.3.2 or later.
- If upgrade is not possible, remove or disable the
crypto_extendedmodule at compile time. - Use static analysis to detect usage of WIP functions.
Hunting:
- Search for strings like "crypto_extended" or "WIP" in binary images.
- Check for unusual keystream generation patterns in network traffic.
Indicators of Compromise (IOCs)
- File Hashes (SHA256):
crypto_extended.c(vulnerable):e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855libcrypto.so(vulnerable):a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a
- Network Signatures:
- Unusual keystream data in plaintext (e.g., high entropy, repeated patterns).
- Process Behavior:
- Calls to
crypto_extended_generate_keystreamvialtraceorstrace.
- Calls to
- Log Entries:
- Error messages from patched versions: "Extended procedures not supported".
Detection Engineering
YARA Rule
rule CVE_2025_46674_NASA_CryptoLib_Keystream_Oracle {
meta:
description = "Detects vulnerable NASA CryptoLib extended procedures"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-46674"
severity = "low"
strings:
$s1 = "crypto_extended_generate_keystream" ascii wide nocase
$s2 = "WIP" ascii wide nocase
$s3 = "Extended Procedures" ascii wide nocase
condition:
any of ($s*) and filesize < 1MB
}
Sigma Rule
title: Detection of NASA CryptoLib Extended Procedures Usage
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects calls to vulnerable CryptoLib extended procedures
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/my_binary'
CommandLine|contains: 'crypto_extended'
condition: selection
falsepositives:
- Legitimate testing in controlled environments
level: low
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2025-46674 NASA CryptoLib Keystream Oracle"; flow:to_server; content:"crypto_extended_generate_keystream"; nocase; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade to CryptoLib version 1.3.2 or later.
- If upgrade is not possible, remove the
crypto_extendedmodule from the build configuration. - Review all code that uses CryptoLib to ensure no WIP functions are called.
Long-Term Measures:
- Implement compile-time flags to exclude development code from production builds.
- Add runtime assertions or error handling for deprecated functions.
- Conduct regular security audits of cryptographic libraries.
Compensating Controls:
- Restrict local access to systems running CryptoLib.
- Use application whitelisting to prevent execution of unauthorized binaries.
- Monitor for anomalous keystream generation.
Valters IT
Securing Code, Defending Infrastructure