VAITP Dataset

← Back to the dataset

CVE-2022-23491

Root certificate removal from Certifi due to spyware concerns

  • CVSS 7.5
  • CWE-345 Insufficient Verification of Data Authenticity
  • Cryptographic
  • Remote

Certifi is a curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. Certifi 2022.12.07 removes root certificates from "TrustCor" from the root store. These are in the process of being removed from Mozilla's trust store. TrustCor's root certificates are being removed pursuant to an investigation prompted by media reporting that TrustCor's ownership also operated a business that produced spyware. Conclusions of Mozilla's investigation can be found in the linked google group discussion.

CVSS base score
7.5
Published
2022-12-07
OWASP
A06 Vulnerable and Outdated Components
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Cryptographic
Subcategory
Improper SSL/TLS Certificate Validation
Accessibility scope
Remote
Impact
Information Disclosure
Affected component
Certifi
Fixed by upgrading
Yes

Solution

Update Certifi to version 2022.12.08 or higher.

Vulnerable code sample

import certifi
import ssl

# Create a context using the old certifi CA bundle that includes TrustCor certificates
context = ssl.create_default_context(cafile=certifi.where())

# Example of establishing a secure connection using the old context
with ssl.wrap_socket(socket.socket(), ssl_context=context) as s:
    s.connect(('example.com', 443))
    print(s.recv(1024))

Patched code sample

import certifi
import ssl

# Create a context that uses the updated certifi CA bundle
context = ssl.create_default_context(cafile=certifi.where())

# Example of establishing a secure connection using the updated context
with ssl.wrap_socket(socket.socket(), ssl_context=context) as s:
    s.connect(('example.com', 443))
    print(s.recv(1024))

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

  • 2022.12.07 (certifi/python-certifi)
    certifi/__init__.py

Cite this entry

@misc{vaitp:cve202223491,
  title        = {{Root certificate removal from Certifi due to spyware concerns}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2022},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2022-23491},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2022-23491/}}
}

Download this entry as JSON Download the whole dataset

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 ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.