CVE-2023-40178
JSON

5.3medium

@node-saml/node-saml's validatePostRequestAsync does not include checkTimestampsValidityError

Severity
5.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.49% (higher than 43% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-vx8m-6fhw-pccw

Description

Node-SAML is a SAML library not dependent on any frameworks that runs in Node. 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. 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. This issue was patched in version 4.0.5.

Affected

Product or packageVersionsReported by
node-saml node-saml< 4.0.5, before 4.0.5CVE List
@node-saml/node-saml (npm)before 4.0.5GitHub Advisory Database
node_saml_project node_samlbefore 4.0.5NVD

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Classification

CWE-347CWE-613

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

Node-SAML is a SAML library not dependent on any frameworks that runs in Node. 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. 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. This issue was patched in version 4.0.5.

GitHub Advisory Database
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.

NVD (es)

Node-SAML es una librería SAML que no depende de ningún framework que se ejecute en Node. La falta de comprobación de la marca de tiempo actual permite que un LogoutRequest XML se reutilice varias veces incluso cuando el tiempo actual ha pasado el NotOnOrAfter. Esto podría afectar al usuario, que podría cerrar la sesión con un LogoutRequest caducado. En contextos más grandes, si los LogoutRequests son enviados en masa a diferentes SPs, esto podría afectar a muchos usuarios a gran escala. Este problema fue corregido en la versión 4.0.5.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-40178 changed 2024-10-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-vx8m-6fhw-pccw changed 2026-09-10CC-BY-4.0
NVDCVE-2023-40178 changed 2026-06-17Public domain