CVE-2026-81690 in openssl_encrypt
Summary
by MITRE • 08/27/2026
openssl-encrypt (pip package) before 1.4.9 contains a symlink-following flaw in its verify-usb v2 added-file allowlist scan. The scan enumerated the drive with rglob(), which in CPython does not descend into symlinked directories and treats the symlink as an ordinary directory, while O_NOFOLLOW on the hash side binds only the final path component. An evil-maid attacker with physical access to the removable drive could replace a tool-tree directory with a symlink to a copy containing byte-identical files plus a planted __pycache__/*.pyc file (which CPython loads in preference to recompiling the clean .py). The planted file is never enumerated, added_files stays 0, and verify-usb reports PASSED, resulting in code execution when the victim runs the portable install. Fixed in 1.4.9 (affects both 1.4.x and 1.5.x lines).
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 08/27/2026
The openssl-encrypt Python package prior to version 1.4.9 contains a critical symlink-following vulnerability within its verify-usb v2 added-file allowlist scanning mechanism, which fundamentally compromises the integrity verification process for portable installations. This flaw arises from an inconsistency in how file system paths are resolved and enumerated during the security check phase. Specifically, the scan utilizes Python's rglob method to enumerate files on a removable drive. In standard CPython implementations, rglob does not descend into directories that are symbolic links; instead, it treats the symlink itself as if it were a regular directory entry without following its target. This behavior creates a blind spot in the security logic because the verification process fails to inspect the actual contents pointed to by these symlinks, allowing an attacker to bypass integrity checks entirely through physical manipulation of the storage medium.
The operational impact of this vulnerability is severe for users relying on portable or removable media for secure operations. An evil-maid attacker with physical access to a user's removable drive can exploit this flaw by replacing a legitimate tool-tree directory with a symbolic link pointing to an external location, such as another partition or network share controlled by the attacker. Within this linked target, the attacker places byte-identical copies of the original files alongside a maliciously crafted _pycache_/*.pyc file. Because CPython prioritizes loading compiled bytecode from _pycache_ over recompiling source .py files when available, the interpreter will execute the planted pyc file instead of any legitimate code. Since the rglob enumeration skips the symlinked directory entirely, the added_files counter remains at zero, causing the verify-usb routine to incorrectly report a PASSED status despite the presence of malicious artifacts.
This vulnerability effectively allows for arbitrary code execution on the victim's system when they run their portable install from the compromised drive. The attacker does not need to modify any source files directly visible in the directory structure; instead, they leverage Python's bytecode caching mechanism and the OS-level handling of symbolic links to inject executable payloads that evade detection. This represents a significant breach of trust for users who assume that verifying file hashes or presence is sufficient to guarantee code integrity against physical tampering attacks. The flaw affects both the 1.4.x and 1.5.x lines of the software, indicating a systemic issue in how path traversal and symlink resolution are handled across multiple versions.
To mitigate this risk, users must upgrade immediately to version 1.4.9 or later, where the scanning logic has been corrected to properly resolve symbolic links and inspect their targets during the integrity verification process. From an industry standards perspective, this vulnerability aligns with CWE-59: Improper Link Resolution Before File Access (Link Following), as it involves incorrect resolution of a link reference before accessing files within that linked directory. Furthermore, in the context of the MITRE ATT&CK framework, this attack vector relates to T1036: Masquerading and potentially T1499: Endpoint Denial of Service if the goal is disruption, but primarily it facilitates unauthorized code execution which falls under initial access or persistence techniques depending on deployment. Security practitioners should also consider implementing additional controls such as disabling bytecode caching in untrusted environments using PYTHONDONTWRITEBYTECODE environment variables to provide defense-in-depth against similar symlink-based bypasses.