CVE-2021-39171
JavaScript vulnerability analysis and mitigation

Overview

Passport-SAML, a SAML 2.0 authentication provider for Passport and Node.js authentication library, was found to contain a vulnerability (CVE-2021-39171) disclosed on August 27, 2021. Prior to version 3.1.0, the library allowed unlimited transforms in SAML payloads, which could be exploited to consume significant system resources (AttackerKB).

Technical details

The vulnerability stems from the library's handling of SAML transforms, where it did not impose any limits on the number of transforms that could be processed in a signed node. According to W3C XML Signature best practices, a WebSSO profile shouldn't have more than 2 transforms - typically an 'enveloped-signature' and an exclusive canonicalization transform (GitHub PR).

Impact

When exploited, this vulnerability could lead to a denial-of-service condition by consuming significant system resources during the processing of malicious SAML payloads. The attack could be executed through specially crafted SAML messages that would force the system to process an excessive number of transforms, resulting in reduced or denied service (GitHub Advisory).

Mitigation and workarounds

The vulnerability was resolved in version 3.1.0 of passport-saml. The fix implements a limit of 2 transforms for signed nodes, which aligns with the W3C XML Signature best practices. Users are advised to upgrade to version 3.1.0 or later to address this security issue (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-59532HIGH8.6
  • JavaScriptJavaScript
  • @openai/codex
NoYesSep 22, 2025
CVE-2025-59430HIGH8.2
  • JavaScriptJavaScript
  • @meshconnect/web-link-sdk
NoYesSep 22, 2025
CVE-2025-59433MEDIUM5.3
  • JavaScriptJavaScript
  • @conventional-changelog/git-client
NoYesSep 22, 2025
CVE-2025-59526LOW2.7
  • JavaScriptJavaScript
  • mailgen
NoYesSep 22, 2025
GHSA-g38c-wxjf-xrh6HIGHN/A
  • JavaScriptJavaScript
  • git-commiters
NoYesSep 22, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management