Quick answers
- Is CVE-2023-40178 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2023-40178 being exploited in the wild.
- How severe is CVE-2023-40178?
- Low severity, with a CVSS score of 3.1, published 21 August 2023.
- Which products and versions are affected?
- @node-saml/node-saml (npm) SEMVER:introduced=0,fixed=4.0.5.
- Is there a fix for CVE-2023-40178?
- Yes. @node-saml/node-saml (npm): upgrade to 4.0.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2023-40178 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2023-40178?
- Check whether you run @node-saml/node-saml (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- @node-saml/node-saml (npm): upgrade to 4.0.5 or later
npm install @node-saml/node-saml@4.0.5
Technical details
The vulnerability is a timestamp validation bypass (CWE-347) in the validatePostRequestAsync() function within saml.js. The library checks the IssueInstance and NotOnOrAfter fields but omits the checkTimestampsValidityError validation, which compares the current time against the request's expiration time. An attacker with a valid LogoutRequest XML (possessing valid signature and certificate) can replay it multiple times regardless of whether the current timestamp exceeds the NotOnOrAfter value. The flaw requires the attacker to have obtained a valid LogoutRequest but allows unlimited replay without time-based restrictions. The vulnerability was patched in version 4.0.5.
Affected products
- node-saml node-saml <4.0.5
Identifiers
- CVE-2023-40178
- GHSA-vx8m-6fhw-pccw
Timeline
- 2023-08-21: disclosed
- 2023-08-21: patched: version 4.0.5 released