Medium, CVSS 6.5npmAmendedPublished
CSRF Vulnerability in jquery-ujs
GHSA-6qqj-rx4w-r3cj
- Affected
- npm jquery-ujs <= 1.0.3
- Fixed in
- 1.0.4· Vendor fix available
- Issue
- Versions 1.0.3 and earlier of jquery-ujs are vulnerable to an information leakage attack that may enable attackers to launch CSRF attacks, as it allows attackers to send CSRF tokens to external domains. When an attacker controls the href attribute of an anchor tag, or the action attribute of a form tag triggering a POST action, the attacker can set the href or action to " https://attacker.com". By prepending a space to the external domain, it causes jQuery to consider it a same origin request, resulting in the user's CSRF token being sent to the external domain. Recommendation Upgrade jquery-ujs to version 1.0.4 or later.
Recommended action: Upgrade to 1.0.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.