{"id":1241,"cve":"CVE-2024-55655","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2024-55655\/","cwe":"CWE-20","cwe_number":20,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/20","cvss_score":2.7,"published":"2024-12-10","owasp":"A08 Software and Data Integrity Failures","odc":"Algorithm","cdc":"Incorrect Check","category":"Input Validation and Sanitization","subcategory":"Insecure Parsing or Deserialization","scope":"Remote","impact":"Denial of Service (DoS)","summary":"sigstore-python versions 2.0.0 to 3.5.9 insufficiently validate \"integration time\" in v2\/v3 bundles, leading to potential DoS.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2024-55655\/","description":"sigstore-python is a Python tool for generating and verifying Sigstore signatures. Versions of sigstore-python newer than 2.0.0 but prior to 3.6.0 perform insufficient validation of the \"integration time\" present in \"v2\" and \"v3\" bundles during the verification flow: the \"integration time\" is verified *if* a source of signed time (such as an inclusion promise) is present, but is otherwise trusted if no source of signed time is present. This does not affect \"v1\" bundles, as the \"v1\" bundle format always requires an inclusion promise.  Sigstore uses signed time to support verification of signatures made against short-lived signing keys. The impact and severity of this weakness is *low*, as Sigstore contains multiple other enforcing components that prevent an attacker who modifies the integration timestamp within a bundle from impersonating a valid signature. In particular, an attacker who modifies the integration timestamp can induce a Denial of Service, but in no different manner than already possible with bundle access (e.g. modifying the signature itself such that it fails to verify). Separately, an attacker could upload a *new* entry to the transparency service, and substitute their new entry's time. However, this would still be rejected at validation time, as the new entry's (valid) signed time would be outside the validity window of the original signing certificate and would nonetheless render the attacker auditable.","solution":"Upgrade to sigstore-python 3.6.0 or later.","affected_component":"sigstore-python","fixed_by_upgrading":true,"vulnerable_code":"def verify_bundle(bundle):\n\n    try:\n        integration_time = bundle[\"integration_time\"]  \n        signed_time_source = bundle.get(\"signed_time_source\") \n\n        if signed_time_source:\n            if not validate_integration_time(integration_time):\n                 return False\n        else:\n            pass \n\n        return True\n    except KeyError:\n        return False\n\n\ndef validate_integration_time(time):\n    return True\n\n","patched_code":"def verify_bundle(bundle):\n\n    if bundle['version'] in ('v2', 'v3'):\n        integration_time = bundle.get('integrationTime')\n        signed_time_source = bundle.get('signedTimeSource')\n\n        if integration_time is not None:\n            if signed_time_source is None:\n                if not validate_integration_time(integration_time):\n                    raise ValueError(\"Invalid integration time\")\n            else:\n                pass\n        else:\n            raise ValueError(\"Missing integration time\")\n        \ndef validate_integration_time(integration_time):\n    from datetime import datetime, timedelta\n    try:\n        time = datetime.fromisoformat(integration_time)\n        return (datetime.now(tz=time.tzinfo) - time) < timedelta(hours=24)\n    except ValueError:\n        return False","payload_needed":true,"payload":"```json\n{\n  \"payloadType\": \"v2\",\n  \"integrationTime\": \"2024-10-27T12:00:00Z\" \n}\n```","payload_status":"available","published_fix":[{"repository":"sigstore\/sigstore-python","commit_url":"https:\/\/github.com\/sigstore\/sigstore-python\/commit\/300b502ae99ebfaace124f1f4e422a6a669369cf","commit_subject":"fix: require an inclusion promise when log integration time is used (#1247)","units":[{"file":"sigstore\/models.py","function":"Bundle._verify"},{"file":"sigstore\/verify\/verifier.py","function":"Verifier._establish_time"}]}],"references":null}