{"answers":{"affected":"2 open source packages ship an affected version, including @digitalbazaar/zcap.","exploited":"There is no known exploitation of CVE-2024-31995 in the wild and no public exploit code.","fix":"Upgrade @digitalbazaar/zcap to 9.0.1 or later.","what":"CVE-2024-31995 is a medium-severity vulnerability in digitalbazaar zcap, published on 10 Apr 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-31995 and fix it if it is affected.\n\nWhat it is: CVE-2024-31995 is a medium-severity vulnerability in digitalbazaar zcap, published on 10 Apr 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-31995 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @digitalbazaar/zcap (npm): affected all versions; fixed in 9.0.1\n- @digitalbazaar/zcap (npm): affected all versions; fixed in 9.0.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-31995/ (Markdown: https://insights.sbomify.com/CVE-2024-31995/index.md)","id":"CVE-2024-31995","markdown":"https://insights.sbomify.com/CVE-2024-31995/index.md","name":"CVE-2024-31995","record":{"aliases":["GHSA-hp8h-7x69-4wmv"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript zcap library","requires_auth":"low_privilege","summary":"Attackers can bypass expiration checks in delegated capability chains, allowing unauthorized access outside the intended time period.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":4.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-613","name":"DEPRECATED: Insufficient Session Expiration"}],"description":"`@digitalbazaar/zcap` provides JavaScript reference implementation for Authorization Capabilities. Prior to version 9.0.1, when invoking a capability with a chain depth of 2, i.e., it is delegated directly from the root capability, the `expires` property is not properly checked against the current date or other `date` param.  This can allow invocations outside of the original intended time period.  A zcap still cannot be invoked without being able to use the associated private key material. `@digitalbazaar/zcap` v9.0.1 fixes expiration checking. As a workaround, one may revoke a zcap at any time.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"zcap has incomplete expiration checks in capability chains.","id":"CVE-2024-31995","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"security_feature_bypass","year":"2024"},"n_packages":2,"n_references":4,"next":{"headline":"XWiki Commons missing escaping of `{` in Velocity escapetool allows remote code execution","id":"CVE-2024-31996"},"packages":[{"ecosystem":"npm","fixed":["9.0.1"],"introduced":["0"],"last_affected":[],"package":"@digitalbazaar/zcap","purl":null,"source":"GHSA-hp8h-7x69-4wmv"},{"ecosystem":"npm","fixed":["9.0.1"],"introduced":["0"],"last_affected":[],"package":"@digitalbazaar/zcap","purl":"pkg:npm/%40digitalbazaar/zcap","source":"GHSA-hp8h-7x69-4wmv"}],"prev":{"headline":"Mealie vulnerable to a DoS in recipe image importer (GHSL-2023-228)","id":"CVE-2024-31994"},"products":["zcap"],"published":"2024-04-10","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["digitalbazaar"]},"summary":"Attackers can bypass expiration checks in delegated capability chains, allowing unauthorized access outside the intended time period.","url":"https://insights.sbomify.com/CVE-2024-31995/"}