CVE-2022-23491: Certifi Certifi Removing TrustCor Root Certificate Vulnerability

MODERATE
Advisory Identifier: GHSA-43fp-rhv2-5gv8
CVSS 6.8
CWE-345
Published
Advisory Summary

CVE-2022-23491 is a MODERATE (CVSS 6.8) certifi removing trustcor root certificate vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting Certifi libraries in the PyPI ecosystem. The issue involves certifi removing trustcor root certificate. Remediation is available by upgrading affected packages to version 2022.12.07.

CVE-2022-23491 at a Glance

CVE Identifier CVE-2022-23491
GHSA Identifier GHSA-43fp-rhv2-5gv8
Severity MODERATE
CVSS v3.1 Base Score 6.8
CWE Classification CWE-345: Insufficient Verification of Data Authenticity
Affected Product Certifi
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2022-23491

To remediate this vulnerability, upgrade all affected Certifi dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

certifi fixed: 2022.12.07
pip install certifi>=2022.12.07
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show certifi

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2022-23491, inspect your installed packages using pip:

pip show certifi

Analyze the terminal output to locate any version of Certifi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2022.12.07), your application is affected.

Note: The pip show certifi command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-345: Insufficient Verification of Data Authenticity, where the product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. In Certifi, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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 [here](https://groups.google.com/a/mozilla.org/g/dev-security-policy/c/oxX69KFvsm4/m/yLohoVqtCgAJ).

CVE-2022-23491 Affected Certifi Versions

1 component(s)
Fixed Versions:
2022.12.07
Product / Package Ecosystem Affected Versions Fixed Version
certifi
PyPI
≥ 2017.11.05
< 2022.12.07
2022.12.07

References

Frequently Asked Questions

What is CVE-2022-23491?
CVE-2022-23491 is a security vulnerability in Certifi involving Certifi removing TrustCor root certificate under CWE-345: Insufficient Verification of Data Authenticity.
Which Certifi versions are affected?
Affected versions include releases prior to 2022.12.07 across affected packages: certifi.
What version fixes CVE-2022-23491?
Upgrading to 2022.12.07 (or the latest patched release for your respective branch) resolves the vulnerability.
Is certifi affected?
Yes, certifi is affected in releases prior to 2022.12.07. Upgrade your dependency to 2022.12.07 or later.
What is the CVSS score of CVE-2022-23491?
CVE-2022-23491 has a CVSS v3.1 base score of 6.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:H/A:N.
What CWE is associated with CVE-2022-23491?
CVE-2022-23491 is classified under CWE-345: Insufficient Verification of Data Authenticity (The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.).
How can I check PyPI dependencies for CVE-2022-23491?
Run the dependency tree command: 'pip show certifi'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-43fp-rhv2-5gv8",
  "modified" : "2025-02-12T18:33:24Z",
  "published" : "2022-12-07T23:05:18Z",
  "aliases" : [ "CVE-2022-23491" ],
  "summary" : "Certifi removing TrustCor root certificate",
  "details" : "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.\n\nTrustCor'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 [here](https://groups.google.com/a/mozilla.org/g/dev-security-policy/c/oxX69KFvsm4/m/yLohoVqtCgAJ).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "certifi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2017.11.05"
      }, {
        "fixed" : "2022.12.07"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/certifi/python-certifi/security/advisories/GHSA-43fp-rhv2-5gv8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-23491"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/certifi/python-certifi/commit/9e9e840925d7b8e76c76fdac1fab7e6e88c1c3b8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/certifi/python-certifi"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/certifi/PYSEC-2022-42986.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/a/mozilla.org/g/dev-security-policy/c/oxX69KFvsm4/m/yLohoVqtCgAJ"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20230223-0010"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-345" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-12-07T23:05:18Z",
    "nvd_published_at" : "2022-12-07T22:15:00Z"
  }
}