CVE-2025-59036: Infrahub Deleted And Expired API Tokens Vulnerability

MODERATE
Advisory Identifier: GHSA-v2p7-4pv4-3wwh
CVSS 5.5
CWE-298
Published
Advisory Summary

CVE-2025-59036 is a MODERATE (CVSS 5.5) deleted and expired api tokens vulnerability (CWE-298: Improper Validation of Certificate Expiration) affecting Infrahub libraries in the PyPI ecosystem. The issue involves deleted and expired api tokens can still authenticate. Remediation is available by upgrading affected packages to version 1.3.9, 1.4.5.

CVE-2025-59036 at a Glance

CVE Identifier CVE-2025-59036
GHSA Identifier GHSA-v2p7-4pv4-3wwh
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-298: Improper Validation of Certificate Expiration
Affected Product Infrahub
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.5

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2025-59036

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

infrahub-server fixed: 1.3.9
pip install infrahub-server>=1.3.9
infrahub-server fixed: 1.4.5
pip install infrahub-server>=1.4.5
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 infrahub-server

How to Check if You Are Affected

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

pip show infrahub-server

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-298: Improper Validation of Certificate Expiration, where a certificate expiration is not validated or is incorrectly validated. In Infrahub, 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

### Impact A bug in the authentication logic will cause API tokens that were deleted and/or expired to be considered valid. This means that any API token that is associated with an active user account can authenticate successfully. ### Patches This issue is fixed in versions `1.3.9` and `1.4.5` ### Workarounds Users can delete or deactivate the account associated with a deleted API token to prevent that token from authenticating.

CVE-2025-59036 Affected Infrahub Versions

2 component(s)
Fixed Versions:
1.3.91.4.5
Product / Package Ecosystem Affected Versions Fixed Version
infrahub-server
PyPI
< 1.3.9
1.3.9
infrahub-server
PyPI
≥ 1.4.0
< 1.4.5
1.4.5

References

Frequently Asked Questions

What is CVE-2025-59036?
CVE-2025-59036 is a security vulnerability in Infrahub involving Deleted and expired API tokens can still authenticate under CWE-298: Improper Validation of Certificate Expiration.
Which Infrahub versions are affected?
Affected versions include releases prior to 1.3.9, 1.4.5 across affected packages: infrahub-server.
What version fixes CVE-2025-59036?
Upgrading to 1.3.9, 1.4.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is infrahub-server affected?
Yes, infrahub-server is affected in releases prior to 1.3.9, 1.4.5. Upgrade your dependency to 1.3.9, 1.4.5 or later.
What is the CVSS score of CVE-2025-59036?
CVE-2025-59036 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2025-59036?
CVE-2025-59036 is classified under CWE-298: Improper Validation of Certificate Expiration (A certificate expiration is not validated or is incorrectly validated.).
How can I check PyPI dependencies for CVE-2025-59036?
Run the dependency tree command: 'pip show infrahub-server'. 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-v2p7-4pv4-3wwh",
  "modified" : "2025-09-10T20:47:07Z",
  "published" : "2025-09-10T20:47:07Z",
  "aliases" : [ "CVE-2025-59036" ],
  "summary" : "Infrahub: Deleted and expired API tokens can still authenticate",
  "details" : "### Impact\nA bug in the authentication logic will cause API tokens that were deleted and/or expired to be considered valid. This means that any API token that is associated with an active user account can authenticate successfully.\n\n### Patches\nThis issue is fixed in versions `1.3.9` and `1.4.5`\n\n### Workarounds\nUsers can delete or deactivate the account associated with a deleted API token to prevent that token from authenticating.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "infrahub-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "infrahub-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.4.0"
      }, {
        "fixed" : "1.4.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/opsmill/infrahub/security/advisories/GHSA-v2p7-4pv4-3wwh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59036"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opsmill/infrahub/commit/215185f217e2f754f7c0a0aa4b77e11079a063a1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opsmill/infrahub/commit/61b49a4a9e988f10c3a44f0e86ef97f344a1e228"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/opsmill/infrahub"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opsmill/infrahub/releases/tag/infrahub-v1.3.9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opsmill/infrahub/releases/tag/infrahub-v1.4.5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-298" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-10T20:47:07Z",
    "nvd_published_at" : "2025-09-09T22:15:34Z"
  }
}