# GHSA-6qqj-rx4w-r3cj: CSRF Vulnerability in jquery-ujs

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-08-31T22:48:44.000Z
- Modified: 2021-09-23T19:45:13.000Z
- Weaknesses: CWE-352

## Description

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.

(As written by GitHub Advisory Database.)

## Affected

- jquery-ujs (npm): before 1.0.4

## References

- <https://hackerone.com/reports/49935> (web)
- <https://groups.google.com/forum/#!msg/rubyonrails-security/XIZPbobuwaY/fqnzzpuOlA4J> (web)
- <https://snyk.io/vuln/npm:jquery-ujs:20150624> (web)
- <https://www.npmjs.com/advisories/15> (web)

## Sources

- GitHub Advisory Database: [GHSA-6qqj-rx4w-r3cj](https://github.com/advisories/GHSA-6qqj-rx4w-r3cj), CC-BY-4.0, modified 2021-09-23

---

Page: https://cve.day/GHSA-6qqj-rx4w-r3cj · Whole record: https://cve.day/GHSA-6qqj-rx4w-r3cj.json · Rebuilt by cve.day 2026-11-25T22:56:44.414Z
