Sceawere
Vulnerability Detail
CVE-2026-81695UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
openssl_encrypt Terminal Injection Vulnerability
Vulnerability Metadata
- Severity
- Low
- Score / CVSS
- 3.3
- Creation Date
- 1h ago
- Vendor
- jahlives
- Product
- openssl_encrypt
- Attack Type
- Improper Output Neutralization for Logs
- Vector String
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Attack Complexity
- LOW
Narrative and Response
Description
openssl_encrypt versions before 1.4.9 fail to escape attacker-controlled key_id values printed to stderr during decrypt auto-detection. Attackers can craft encrypted files with malicious key_id containing escape sequences to repaint terminal output and forge authenticity verification blocks.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "3.3",
"pubDate": "2026-08-27T17:20:59.597Z",
"pubdate": "2026-08-27T17:20:59.597Z",
"executiveSummary": "A terminal injection vulnerability exists within the openssl_encrypt function in versions prior to 1.4.9, arising from insufficient sanitization of attacker-controlled key_id values during the decrypt auto-detection process.\nThe vulnerability allows an unauthenticated attacker to inject malicious terminal escape sequences into the application's stderr output.\nBy crafting a specially formatted encrypted file, an attacker can manipulate terminal rendering, potentially repainting the user's console display.\nThe primary security risk involves the potential for visual deception, where an attacker can forge or spoof authenticity verification blocks, misleading the user or automated monitoring systems into believing a tampered or malicious operation was legitimate.\nThe flaw stems from the insecure handling of metadata extracted from encrypted payloads, which is subsequently rendered to a terminal interface without proper escape sequence filtering or neutralization.\nSuccessful exploitation requires the attacker to entice a target to process a malicious file with a version of openssl_encrypt affected by this flaw, making this an input-validation failure that impacts the integrity of terminal-based monitoring and security logging.",
"technicalDetails": "The vulnerability is localized to the decrypt auto-detection routine within the openssl_encrypt codebase, specifically where the key_id parameter is extracted from the encrypted file header and subsequently emitted to the standard error (stderr) stream.\nThe root cause of this vulnerability is a lack of input validation and sanitization regarding the key_id field. The function treats the key_id as a trusted string and passes it directly to the terminal output stream, failing to sanitize or escape ANSI/VT100 control sequences.\nExploitation is achieved by embedding arbitrary terminal escape sequences into the key_id field of a malformed encrypted file. When the application attempts to auto-detect the decryption parameters, it encounters the malicious key_id and writes the raw bytes to the terminal.\nThe attack flow proceeds as follows: First, the attacker creates a payload containing an encrypted structure with an injected key_id field containing specific terminal escape sequences (e.g., cursor positioning, clearing lines, or text color changes). Second, the attacker distributes this file to a target. Third, when a user or automated system invokes the vulnerable openssl_encrypt function on the malicious file, the auto-detection mechanism logs the key_id to stderr.\nAs the terminal interprets these escape sequences, the attacker gains the ability to 'repaint' the console. This can be used to overwrite previous terminal output, obscure real warning messages, or fabricate false success/authenticity verification blocks by visually simulating application output.\nThis behavior facilitates social engineering or UI-based spoofing, where the terminal environment acts as a trusted interface. By visually falsifying the output of security-critical checks, the attacker can deceive the operator into performing actions that compromise the system's security posture.\nThe vulnerability affects all versions of openssl_encrypt prior to 1.4.9. The exposure is effectively local or limited to where terminal output is visible, yet it remains a significant risk for administrative workflows where CLI tools are trusted to provide accurate diagnostic feedback regarding decryption and authentication verification processes."
}