CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-74870

CVE-2026-74870: Cleartext Exposure of Hardware-Derived Cryptographic Peppers in openssl_encrypt

Alon Barad
Alon Barad
Software Engineer

Dec 3, 2026·10 min read·5 visits

Executive Summary (TL;DR)

Versions of the openssl_encrypt Python package up to 1.4.7 unconditionally output derived hardware peppers and FIDO2 PRF secrets in hexadecimal cleartext to the terminal and debug logs during diagnostic testing. Upgrading to version 1.4.8 or 1.5.0 removes the hexadecimal dumps and enforces strict secret redaction.

CVE-2026-74870 is an information exposure vulnerability in the Python package openssl_encrypt affecting versions 1.4.7 and earlier. The diagnostic CLI subcommands 'hsm fido2-test' and 'hsm onlykey-test' unconditionally write full derived hardware cryptographic peppers as hexadecimal strings to standard error. Additionally, the FIDO2 hardware pepper plugin logs unredacted pseudo-random function (PRF) output to debug logs and user-facing error messages. While the diagnostic pepper is bound to a random per-invocation test salt and cannot directly decrypt stored files, the behavior exposes raw hardware-derived key material to terminal scrollbacks, session recordings, and CI/CD logs.

Vulnerability Overview

The openssl_encrypt Python package provides file encryption utilities that integrate with Hardware Security Modules (HSMs) and hardware security keys, including FIDO2 PRF/HMAC-Secret authenticators, YubiKeys, and OnlyKey tokens. These hardware tokens generate cryptographic peppers that are combined with user passwords during Key Derivation Function (KDF) cycles to strengthen encryption keys against offline brute-force attacks.

In versions up to and including 1.4.7, openssl_encrypt contains an information exposure vulnerability classified under CWE-532 (Insertion of Sensitive Information into Log File) and CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor). When a user or automated pipeline executes the diagnostic subcommands openssl-encrypt hsm fido2-test or openssl-encrypt hsm onlykey-test, the command-line handler unconditionally serializes the derived hardware pepper into a hexadecimal string and writes it to the standard error stream via eprint().

A secondary exposure path exists within the FIDO2 hardware pepper plugin (openssl_encrypt/plugins/hsm/fido2_pepper/__init__.py) and the asymmetric cryptography self-test routine (openssl_encrypt/modules/asymmetric_core.py). In the FIDO2 plugin, raw pseudo-random function output (prf_data) is passed directly to debug loggers and interpolated into error messages without traversing the application's secret-redaction filter (debug_secret()). In the asymmetric core module, self-test roundtrip failures output 32 bytes of password material as hexadecimal strings.

Although the diagnostic routines derive the pepper using a randomly generated per-invocation test salt—meaning the leaked pepper cannot decrypt production files encrypted with unique per-file salts—exposing raw hardware key derivation outputs violates cryptographic hygiene. These secrets persist in terminal scrollback buffers, terminal multiplexer logs (tmux, screen), session recording tools, and centralized continuous integration logs.

Root Cause Analysis

The primary root cause of CVE-2026-74870 is an architectural dispatch mismatch that resulted in an incomplete remediation of an earlier internal security audit finding (tracked as finding H1 [HSM-1]). On 2026-07-07, developers attempted to eliminate cleartext pepper printing by removing hexadecimal output statements from openssl_encrypt/modules/hsm_cli.py.

However, modules/hsm_cli.py is a Click-based frontend module that was not wired into the live openssl-encrypt console entry point. The active application dispatcher routes all hsm subcommands to the handle_hsm_command function inside openssl_encrypt/modules/crypt_cli.py. Because the initial patch only modified the inactive hsm_cli.py module, the active execution path in crypt_cli.py continued to execute eprint(f"Pepper (hex): {pepper.hex()}") upon successful hardware derivation.

In addition to the CLI entry point mismatch, the FIDO2 plugin (fido2_pepper/__init__.py) lacked structural redaction when inspecting responses from the authenticator's hmac-secret or prf extension. During get_hsm_pepper(), the plugin logged the full prf_data dictionary or byte sequence via logger.debug(f"prf_data value: {prf_data}"). Furthermore, if the returned extension data structure did not match expected dictionary keys (results or output1), the plugin constructed an error result containing the raw prf_data object (PluginResult.error_result(f"Unexpected prf/hmac-secret data format: {prf_data}")). The CLI handler subsequently wrote this error message directly to stderr.

Finally, a third violation of the codebase's secret-handling policy existed in openssl_encrypt/modules/asymmetric_core.py. Within the __main__ self-test block for unwrap_password_for_recipient(), a roundtrip verification failure triggered two eprint() calls that output the first 64 hexadecimal characters (32 bytes) of both the original and recovered password buffers prior to calling secure_memzero(password).

Code Analysis

Commit d69ecf25b7e8c8c585f4ae9cc11405b1eefc740e addresses all three exposure vectors across crypt_cli.py, fido2_pepper/__init__.py, and asymmetric_core.py, while introducing static AST and regular expression regression tests.

In openssl_encrypt/modules/crypt_cli.py, the handle_hsm_command function handles both fido2-test (around line 2670) and onlykey-test (around line 2828). In vulnerable versions, both handlers retrieved hsm_pepper from result.data and printed both its byte length and its full hexadecimal representation. The patch removes the .hex() output calls entirely, retaining only the byte length confirmation to verify that hardware derivation succeeded without exposing key material:

--- a/openssl_encrypt/modules/crypt_cli.py
+++ b/openssl_encrypt/modules/crypt_cli.py
@@ -2670,8 +2670,10 @@ def handle_hsm_command(args):
         if result.success:
             pepper = result.data.get("hsm_pepper")
             eprint("\n✅ Test successful!")
+            # Do NOT print the pepper itself — it is key material / a KDF
+            # intermediate (H1 [HSM-1], gitlab#121). The length + success
+            # confirm the derivation works; the value must never reach output.
             eprint(f"Pepper length: {len(pepper)} bytes")
-            eprint(f"Pepper (hex): {pepper.hex()}")
             eprint("\nYour FIDO2 credential is working correctly.")
         else:
             eprint(f"\n❌ Test failed: {result.message}")
@@ -2828,8 +2830,10 @@ def handle_hsm_command(args):
             slot = result.data.get("slot")
             eprint("\n✅ Test successful!")
             eprint(f"Slot: {slot}")
+            # Do NOT print the pepper itself — it is key material / a KDF
+            # intermediate (H1 [HSM-1], gitlab#121). The length + success
+            # confirm the derivation works; the value must never reach output.
             eprint(f"Pepper length: {len(pepper)} bytes")
-            eprint(f"Pepper (hex): {pepper.hex()}")
             eprint("\nYour OnlyKey Challenge-Response is working correctly.")
         else:
             eprint(f"\n❌ Test failed: {result.message}")

In openssl_encrypt/plugins/hsm/fido2_pepper/__init__.py, the patch removes the logger.debug call that dumped the raw prf_data value. It also modifies the fallback error handler so that if prf_data is an unexpected dictionary structure, only the dictionary keys (list(prf_data.keys())) are interpolated into the error string rather than the dictionary values containing the raw PRF output:

--- a/openssl_encrypt/plugins/hsm/fido2_pepper/__init__.py
+++ b/openssl_encrypt/plugins/hsm/fido2_pepper/__init__.py
@@ -481,9 +481,11 @@ def get_hsm_pepper(
                     "The credential may not have prf/hmac-secret enabled. Try re-registering."
                 )
 
-            # Debug: Show the actual structure
+            # Debug: Show the actual structure. Never log the raw value —
+            # prf_data carries the PRF/hmac-secret output the pepper is
+            # derived from (gitlab#121); type/keys/lengths below are enough
+            # to debug the extension-result shape.
             logger.debug(f"prf_data type: {type(prf_data)}")
-            logger.debug(f"prf_data value: {prf_data}")
             if isinstance(prf_data, dict):
                 logger.debug(f"prf_data keys: {list(prf_data.keys())}")
                 for key, val in prf_data.items():
@@ -507,8 +509,11 @@ def get_hsm_pepper(
                 elif "output1" in prf_data:
                     pepper = prf_data["output1"]
                 else:
+                    # Never embed prf_data itself — it is the material the
+                    # pepper is derived from, and error messages reach the
+                    # user via eprint(result.message) (gitlab#121).
                     return PluginResult.error_result(
-                        f"Unexpected prf/hmac-secret data format: {prf_data}"
+                        "Unexpected prf/hmac-secret data format: " f"keys={list(prf_data.keys())}"
                     )
             elif isinstance(prf_data, bytes):
                 # Raw bytes output from hmac-secret extension

In openssl_encrypt/modules/asymmetric_core.py, the self-test failure branch in unwrap_password_for_recipient is updated to report only buffer byte lengths (len(password) and len(recovered)) instead of slicing the first 64 characters of their hexadecimal strings:

--- a/openssl_encrypt/modules/asymmetric_core.py
+++ b/openssl_encrypt/modules/asymmetric_core.py
@@ -696,8 +696,12 @@ def unwrap_password_for_recipient(
             eprint("✅ Password wrapping roundtrip successful!")
         else:
             eprint("❌ Password wrapping failed!")
-            eprint(f"  Original:  {password.hex()[:64]}...")
-            eprint(f"  Recovered: {bytes(recovered).hex()[:64]}...")
+            # Never print the values themselves — even random self-test data
+            # must not normalize hex-dumping secret-shaped material
+            # (never-print-keys policy, gitlab#121). Lengths suffice to see
+            # truncation/corruption; a full mismatch needs a debugger anyway.
+            eprint(f"  Original:  {len(password)} bytes")
+            eprint(f"  Recovered: {len(recovered)} bytes (mismatch)")
 
     # Clean up original password
     secure_memzero(password)

> [!NOTE] > To ensure fix completeness and prevent future regressions across dead or active modules, the maintainers updated openssl_encrypt/unittests/test_hsm_cli_no_pepper_leak.py. This test suite applies regular expressions (SECRET_HEX_ECHO, ANY_HEX_ECHO, and PRF_DATA_LOG) against crypt_cli.py, hsm_cli.py, asymmetric_core.py, and the FIDO2, OnlyKey, and YubiKey plugin files to block any .hex() print statements or direct prf_data string interpolations.

Exploitation and Trigger Mechanics

No active exploitation or public weaponized proof-of-concept exploits exist for CVE-2026-74870. The vulnerability is triggered passively during legitimate administrative or diagnostic operations when a user verifies hardware token connectivity.

To trigger the primary exposure path, a local user with a connected FIDO2 security key or OnlyKey device executes either of the diagnostic commands in a terminal or automated script:

openssl-encrypt hsm fido2-test
openssl-encrypt hsm onlykey-test

When executed on openssl_encrypt version 1.4.7 or earlier, the application challenges the connected hardware authenticator using a random test salt, receives the 32-byte (64-hex-character) hardware response, and prints it directly to standard error:

✅ Test successful!
Pepper length: 32 bytes
Pepper (hex): <64-character-hexadecimal-string>

If debug logging is enabled during normal encryption, decryption, or diagnostic runs involving a FIDO2 authenticator, the secondary exposure vector in fido2_pepper/__init__.py writes prf_data value: ... containing the raw HMAC-Secret output directly to the configured log destination. An attacker with local read access to log files, terminal multiplexer histories, session recordings (such as asciinema or script), or CI/CD job artifacts can harvest these outputs from disk.

Impact Assessment

The practical cryptographic impact of CVE-2026-74870 is constrained by the salt-bound design of the hardware pepper derivation scheme. When hsm fido2-test or hsm onlykey-test runs, openssl_encrypt generates an ephemeral, random per-invocation test salt to send as the challenge to the hardware authenticator. Because the FIDO2 HMAC-Secret / PRF extension and OnlyKey challenge-response mechanisms compute an HMAC over the provided salt using the hardware-resident secret key, the resulting pepper is mathematically tied to that specific test salt.

Real files encrypted by openssl_encrypt generate unique random salts stored within the encrypted file headers. Consequently, an attacker who captures a diagnostic pepper from a terminal log cannot use that leaked hexadecimal string to derive the encryption key for real files, nor can they invert the HMAC output to recover the underlying master secret stored inside the hardware security key.

However, the secondary vulnerability in fido2_pepper/__init__.py poses a broader operational risk when debug logging is enabled or when an authenticator returns a non-standard dictionary structure. Because get_hsm_pepper() is invoked during actual file encryption and decryption workflows—not solely during diagnostic tests—logging prf_data in debug mode or returning it in an unhandled structure error exposes the raw PRF output associated with the active session.

Scoring agencies reflect these differing operational contexts in their assessments. The National Vulnerability Database (NVD) assigned a CVSS v3.1 base score of 3.3 (Low) with vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N, emphasizing the local access requirement and the salt-bound limitation of the diagnostic test commands. Conversely, VulnCheck (acting as the CNA) assigned a CVSS v4.0 base score of 8.7 (High) with vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N, modeling a worst-case scenario where exposed CI/CD or debug logs leak sensitive cryptographic material over a network without privilege requirements. The EPSS score of 0.00188 (8.74th percentile) indicates a low probability of exploitation in the wild.

Remediation and Mitigation

Users and administrators utilizing openssl_encrypt should upgrade to version 1.4.8 or 1.5.0 (or any subsequent release), which incorporates commit d69ecf25b7e8c8c585f4ae9cc11405b1eefc740e. The package can be updated directly via pip:

pip install --upgrade "openssl_encrypt>=1.4.8"

In environments where an immediate package upgrade is not feasible, operators should refrain from executing the openssl-encrypt hsm fido2-test and openssl-encrypt hsm onlykey-test diagnostic commands in shared terminals, recorded terminal sessions, or automated CI/CD pipelines. Additionally, ensure that debug-level logging is disabled during production FIDO2 encryption and decryption operations so that logger.debug statements inside fido2_pepper/__init__.py are not evaluated.

As a post-remediation auditing measure, security teams should inspect centralized log aggregation platforms, CI/CD build logs, and persistent shell capture files for residual hexadecimal dumps generated by prior versions. Specifically, search log repositories for the regular expression pattern Pepper \(hex\): [0-9a-fA-F]{64} or prf_data value: and purge any matching log artifacts.

Official Patches

jahlives (GitHub)Official fix commit removing cleartext pepper hex dumps and redacting FIDO2 prf_data logging
jahlives (GitHub)Release v1.4.8 containing the fix for CVE-2026-74870
GitHub Security AdvisoryOfficial GitHub Security Advisory GHSA-p9g8-wvh4-2jmx

Fix Analysis (1)

Technical Appendix

CVSS Score
3.3/ 10
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
EPSS Probability
0.19%
Top 91% most exploited

Affected Systems

openssl_encrypt (PyPI package)

Affected Versions Detail

Product
Affected Versions
Fixed Version
openssl_encrypt
jahlives
<= 1.4.71.4.8
AttributeDetail
Vulnerability TypeCWE-532: Insertion of Sensitive Information into Log File
Affected Componentopenssl_encrypt (modules/crypt_cli.py, plugins/hsm/fido2_pepper)
CVSS v3.1 (NVD)3.3 Low (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N)
CVSS v4.0 (CNA)8.7 High (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N)
EPSS Score0.19% (8.74th Percentile)
Patched Versions1.4.8, 1.5.0
Exploit StatusNo known public exploits or active exploitation
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1552.001Unsecured Credentials: Credentials In Files
Credential Access
CWE-532
Insertion of Sensitive Information into Log File

The product writes sensitive information to a log file or standard console output streams, making it accessible to unauthorized actors inspecting logs, terminal scrollback buffers, or CI/CD execution histories.

Vulnerability Timeline

Internal security audit finding H1 [HSM-1] identified cleartext pepper printing; initial incomplete fix applied to unwired modules/hsm_cli.py.
2026-07-07
Developer review (gitlab#121) identified the active entry point dispatch to crypt_cli.py and committed comprehensive fix d69ecf25b7e8c8c585f4ae9cc11405b1eefc740e.
2026-07-12
CVE-2026-74870 and GitHub Security Advisory GHSA-p9g8-wvh4-2jmx published; initial NVD record created.
2026-08-17
NVD vulnerability analysis completed and CVSS v3.1 score assigned.
2026-09-03
CVE record metadata updated on CVE.org.
2026-10-01
OSV / PYSEC-2026-3956 vulnerability entry updated.
2026-10-28

References & Sources

  • [1]GitHub Security Advisory: GHSA-p9g8-wvh4-2jmx
  • [2]GitHub Commit: d69ecf25b7e8c8c585f4ae9cc11405b1eefc740e
  • [3]openssl_encrypt Release v1.4.8
  • [4]National Vulnerability Database (NVD): CVE-2026-74870
  • [5]CVE.org Record: CVE-2026-74870
  • [6]CVEProject cvelistV5 JSON Record: CVE-2026-74870
  • [7]VulnCheck Advisory: openssl_encrypt Hardware Pepper Information Disclosure
  • [8]MITRE ATT&CK Search Reference

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•15 minutes ago•CVE-2026-137198
8.3

CVE-2026-137198: Argument Injection in Node.js cross-spawn via Improper Backslash Escaping on Windows

CVE-2026-137198 is a high-severity argument injection vulnerability (CWE-88) affecting the Node.js cross-spawn library in versions 6.0.6 and 7.0.4 through 7.0.6. On Windows systems, when commands are routed through cmd.exe (including batch files and npm cmd-shims in node_modules/.bin), cross-spawn fails to properly double contiguous sequences of two or more backslashes preceding a double quote or at the end of an argument. This parsing failure causes the argument's closing quotation mark to be escaped as a literal character, allowing attacker-controlled input to break out of quotation encapsulation and inject arbitrary command-line arguments or consume subsequent arguments.

Amit Schendel
Amit Schendel
2 views•13 min read
•about 1 hour ago•CVE-2026-144292
7.6

CVE-2026-144292: Client-Side Template Injection and Cross-Site Scripting in DOMPurify via SAFE_FOR_TEMPLATES Bypass

DOMPurify prior to version 3.5.0 contains a sanitization bypass in the SAFE_FOR_TEMPLATES configuration mode. By embedding split template expression delimiters across invalid nested <form> elements, an attacker can evade character data scrubbing during initial sanitization. When the sanitized markup is subsequently re-parsed into the DOM via innerHTML, browser HTML5 parsing rules strip the nested <form> tags and concatenate the split text nodes, reconstructing executable template expressions that trigger Cross-Site Scripting (XSS) in client-side template engines.

Amit Schendel
Amit Schendel
4 views•11 min read
•about 4 hours ago•CVE-2026-142624
6.5

CVE-2026-142624: Validation Logic Bypass via In-Band Sentinel Value Collision in Laravel Framework

A validation logic bypass vulnerability exists in the Laravel Framework validation subsystem prior to versions 12.72.0 and 13.43.0. When validating nested attributes or wildcard arrays using the 'sometimes' rule, the framework uses the literal string '__missing__' as an in-band sentinel value to detect absent keys. An attacker who submits the literal string '__missing__' as the value for a nested attribute causes the validator to misinterpret the field as omitted, bypassing all subsequent validation rules while still returning the unvalidated string in the validated dataset.

Amit Schendel
Amit Schendel
11 views•11 min read
•about 5 hours ago•CVE-2026-142643
5.3

CVE-2026-142643: Validation Exists Rule Bypass via Type Confusion in Laravel Framework

CVE-2026-142643 is a type confusion vulnerability in the Laravel Framework validation subsystem (Illuminate\Validation\DatabasePresenceVerifier) affecting versions prior to 12.73.0 and 13.43.0. When processing JSON-encoded HTTP requests, the framework preserves native integer and boolean scalar types and passes them unchanged into SQL parameter bindings for 'exists' and 'unique' validation rules. On MySQL and MariaDB databases, comparing a string column against an integer value triggers implicit numeric type coercion, causing any non-numeric string entry to evaluate to zero. Consequently, an unauthenticated remote attacker can submit an integer zero or boolean false in a JSON payload to bypass record-existence validation rules without knowing a valid string identifier.

Alon Barad
Alon Barad
5 views•11 min read
•about 6 hours ago•CVE-2026-142649
5.3

CVE-2026-142649: Input Validation Bypass via Loose Type Comparison in Laravel Framework

CVE-2026-142649 (also tracked as GHSA-h2hg-mfj4-rg7q) is an input validation bypass vulnerability affecting the validation subsystem of the Laravel web application framework (laravel/framework). Specifically, the validateIn method in src/Illuminate/Validation/Concerns/ValidatesAttributes.php performs non-strict comparisons when evaluating scalar input values against defined allowlists for the 'in', 'Rule::in', and 'not_in' validation rules. Because PHP's native in_array() function defaults to loose equality (==) when the third parameter ($strict) is omitted, numeric strings with non-canonical representations—such as leading or trailing whitespace, embedded newlines, leading zeros, positive signs, decimal points, or scientific notation—evaluate as equal to standard numeric allowlist entries. Furthermore, because Laravel's validated() and valid() accessor methods return the original, un-canonicalized input string rather than the matched allowlist token, unvalidated characters and unexpected string formats propagate directly into downstream business logic, database queries, and state enforcement checks.

Alon Barad
Alon Barad
6 views•10 min read
•about 7 hours ago•CVE-2026-142652
7.7

CVE-2026-142652: SQL Injection in Agenta Tracing Full-Text Content Filter

An authenticated SQL injection vulnerability exists in Agenta prior to version 0.122.5 within the tracing database query layer. The full-text content filter handler in api/oss/src/dbs/postgres/tracing/utils.py interpolates user-supplied search strings directly into a SQLAlchemy text() construct without parameter binding or escaping. This flaw allows an authenticated user with read access to spans in a single project to execute arbitrary SQL conditions against the tracing database, bypassing project and tenant isolation boundaries to exfiltrate trace data across the entire platform.

Amit Schendel
Amit Schendel
6 views•9 min read