GHSA-JGVM-7JXV-CGCC
File password printed in cleartext by the --debug argv dump for bundled and abbreviated option spellings
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-JGVM-7JXV-CGCC divulgada | |
| Remediación | Parche 1.4.9 | openssl-encrypt · 1 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Under `--debug`, openssl-encrypt prints its own argv, routing secret-valued options through a redaction chokepoint first. `sanitize_argv_for_debug` selected what to redact by exact string membership, plus `--option=value` and a rule matching a token that literally starts with `-p`. argparse accepts two further spellings that neither covers.
The `encrypt` subparser declares `-a/--armor`, `-f/--overwrite` and `-s/--shred` as `store_true` on the same parser as the value-taking `-p/--password`, so argparse resolves `-apHunter2` to `-a` plus `-p=Hunter2` -- a token that does not start with `-p`. Separately, no parser sets `allow_abbrev=False`, so an abbreviated long option such as `--manifest-p` binds `--manifest-password` while matching no set member.
Impact
The file password is written to stderr in cleartext, under the plain `--debug` mode whose own banner states that secrets are redacted (the loud cleartext warning is reserved for `--debug --unsafe-show-secrets`). stderr is not a private channel: it reaches terminal scrollback, is merged by `2>&1`, lands in CI job logs, and the desktop GUI keeps a persistent debug log. The value bypasses the redaction chokepoint entirely.
Reachability -- measured, not assumed
The v1.4.8 sanitizer was lifted verbatim from the release tag and executed:
LEAK ['secret.txt', '-apHunter2'] <- crypt --debug encrypt -i secret.txt -apHunter2
LEAK ['-ap', 'Hunter2'] <- crypt --debug encrypt -i secret.txt -ap Hunter2
safe ['secret.txt', '-p<redacted: 7 bytes>'] <- the only spelling coveredThe `--manifest-p` variant additionally requires `create-usb`, which is unreachable before 1.4.9, so that variant affects no release.
Mitigation
Rotate any password used with `--debug` together with a bundled (`-ap...`, `-afsp...`) or abbreviated (`--passw`, `--pass`) spelling, and review retained terminal logs, CI output and GUI debug logs. The documented `-p PASSWORD` and `-pPASSWORD` forms were always redacted correctly and are unaffected.
Fix
Each token is now resolved the way argparse resolves it before the redaction decision: long options by unambiguous prefix, short-option bundles by walking the letters until a secret-valued short option is reached. Ambiguity fails closed -- an unresolvable option that could name a secret is redacted.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypiopenssl-encrypt |
Corregida | 1.4.9 | 1 d | 1.4.9 no afectada |
1.4.9Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-jgvm-7jxv-cgccLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
