Executive brief
openssl-encrypt is a command-line tool for encrypting files with passwords. When run with the --debug flag, the tool is supposed to redact passwords from its output. However, versions before 1.4.9 fail to redact passwords when supplied using certain shorthand command-line spellings (like -apHunter2), allowing attackers with access to debug logs, terminal history, or CI job output to recover cleartext passwords.
Technical details
The vulnerability exists in the --debug mode's argv sanitization function, which intended to redact secret-valued options but only recognized exact option names, --option=value forms, and tokens literally starting with -p. However, argparse supports two additional option spellings that bypass the redaction logic: bundled short options (e.g., -apHunter2, where -a and -p are combined with the password value inline) and abbreviated long options (e.g., --passw or --pass as shortcuts for --password). These spellings do not match the sanitizer's patterns and leak the cleartext password to stderr. The attack requires no authentication and no special privileges—only access to stderr output, which is routinely captured in terminal scrollback, CI logs, and GUI debug logs. The fix (version 1.4.9) resolves option spellings using argparse's own logic before making redaction decisions.
Affected products
- jahlives openssl-encrypt before 1.4.9
Timeline
- 2026-08-27: disclosed: Advisory published
- 2026-08-12: patched: Version 1.4.9 released with fix