GHSA-vx8m-6fhw-pccw

Suggest an improvement
Source
https://github.com/advisories/GHSA-vx8m-6fhw-pccw
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/08/GHSA-vx8m-6fhw-pccw/GHSA-vx8m-6fhw-pccw.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-vx8m-6fhw-pccw
Aliases
Related
Published
2023-08-21T20:13:05Z
Modified
2023-11-01T05:02:47.772657Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L CVSS Calculator
Summary
@node-saml/node-saml's validatePostRequestAsync does not include checkTimestampsValidityError
Details

Summary

The lack of checking of current timestamp allows a LogoutRequest XML to be reused multiple times even when the current time is past the NotOnOrAfter.

Details

It was noticed that in the validatePostRequestAsync() flow in saml.js, the current timestamp is never checked. This could present a vulnerability where a user who has an XML LogoutRequest could validated it if the IssueInstance and the NotOnOrAfter are valid along with valid credentials (signature, certificate etc.).

PoC

I was able to validate a sample valid LogoutRequest XML multiple times through postman by sending it to my endpoint regardless if the current present time was past the NotOnOrAfter time. After some further testing, it seems that only the IssueInstance is checked against NotOnOrAfter. Not sure if this was the intended behaviour but I believe having a never expiring valid LogoutRequest could be dangerous.

Impact

This could impact the user where they would be logged out from an expired LogoutRequest. In bigger contexts, if LogoutRequests are sent out in mass to different SPs, this could impact many users on a large scale.

Database specific
{
    "nvd_published_at": "2023-08-23T21:15:08Z",
    "cwe_ids": [
        "CWE-347",
        "CWE-613"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2023-08-21T20:13:05Z"
}
References

Affected packages

npm / @node-saml/node-saml

Package

Name
@node-saml/node-saml
View open source insights on deps.dev
Purl
pkg:npm/%40node-saml/node-saml

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.0.5