/

CVE-2026-81707

Severity:

CRITICAL RISK

(9.8)

Improper Input Validation (CWE-20) in openssl_encrypt

CVE-2026-81707

Deferred

Vulnerability type

Category:

Improper Input Validation

CWE:

CWE-20

Impact:

Authentication and Integrity Bypass

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical input-validation vulnerability in openssl_encrypt allows attacker-controlled email fields in imported identity documents to inject ANSI escape sequences into terminal output. Through contact-exchange flows or keyserver responses, an attacker may display a fraudulent fingerprint and undermine out-of-band verification against key substitution.

Affected context

The vulnerability affects deployments using openssl_encrypt versions before 1.4.9 that import identity documents and display fingerprint verification information in terminal interfaces. Risk arises when identity bundles are received through otherwise trusted contact-exchange or keyserver workflows and the imported email field is rendered without sufficient output sanitization.

Exploit preconditions

  • Attack surface: Identity-document import and terminal-based fingerprint display
  • Required access: Ability to provide or influence an identity bundle delivered through contact exchange or a keyserver response
  • Trigger point: Processing and displaying the imported email field alongside the fingerprint verification line
  • Why exploitation is possible: Control characters in the field can affect terminal rendering, allowing displayed verification information to be forged before the user completes an out-of-band comparison

Why this happens

The underlying bug is insufficient validation and output neutralization for an attacker-controlled email field. The application treats imported identity data as ordinary display text without accounting for terminal control sequences, allowing data to alter the presentation of security-relevant output. This maps to CWE-20: Improper Input Validation, because the input is not constrained to the expected email format or safely handled for its output context.

Potential impact

  • Users may accept a fraudulent fingerprint
  • Key-substitution attacks may bypass intended out-of-band verification
  • Attackers could cause misleading or confusing terminal output
  • Communications or identity associations could be established with an unintended key
  • Trust decisions based on displayed fingerprints could be compromised

General mitigation guidance

Mitigation generally focuses on validating identity fields and treating imported data as untrusted at every processing boundary.

Common defensive patterns include:

  • Enforcing strict, standards-based validation for email fields
  • Removing or safely encoding terminal control characters before display
  • Rendering security-sensitive values in a context that cannot interpret escape sequences
  • Separating verified fingerprints from attacker-controlled identity metadata
  • Requiring an independent, trusted comparison channel for key verification
  • Limiting the privileges and trust granted to imported identities

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying untrusted identity fields passed to terminal or console output
  • Code review checks for missing control-character filtering and context-aware output encoding
  • Tests containing non-printing and terminal-control characters in imported metadata
  • Policy enforcement requiring strict schemas for identity documents
  • Automated security review tools that flag unvalidated data reaching security-sensitive display paths

Operational monitoring may also identify unusual identity-bundle sources, repeated import failures, or discrepancies between displayed metadata and independently verified fingerprints.

Sources

SourceLink
github.comgithub.com/jahlives/openssl_encrypt/security/advisories/GHSA-qjr2-x6mr-8xgf
vulncheck.comvulncheck.com/advisories/openssl-encrypt-before-1.4.9-ansi-escape-injection-via-identity-email

Frequently asked

questions

It can be exploitable through normal contact-exchange or keyserver-mediated workflows when an attacker can supply a crafted identity bundle to the target.

No. The attacker generally needs to influence imported identity data; the victim's terminal displays the manipulated verification information during ordinary processing.

Validate imported email fields against an appropriate schema and neutralize or safely encode all terminal control characters before displaying any untrusted metadata.

Treat identity documents as untrusted input, apply context-aware output encoding, test terminal-rendering boundaries, and require independent verification of security-sensitive fingerprints.

Find out what's already
exploitable in your codebase.