jquery_ujs.js in jquery-rails before 3.1.3 and 4.x before 4.0.4 and rails.js in…
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- — Not recorded in CVSS 2.0
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- Partial · None · None
- Fix status
- Partial Red Hat: 4 without a fix
Attack profile from CVSS 2.0 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-200.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | jquery-rails (RubyGems) | before 3.1.3 | 3.1.3 | Patch available | GHSA-4whc-pp4x-9pf3 |
| — | jquery-rails (RubyGems) | 4.0.0 to before 4.0.4 | 4.0.4 | Patch available | GHSA-4whc-pp4x-9pf3 |
| — | jquery-ujs (RubyGems) | before 1.0.4 | 1.0.4 | Patch available | GHSA-4whc-pp4x-9pf3 |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- jquery-rails (RubyGems) Vendor— Affected before 3.1.3 Fixed in 3.1.3 Patch available GHSA-4whc-pp4x-9pf3
- jquery-rails (RubyGems) Vendor— Affected 4.0.0 to before 4.0.4 Fixed in 4.0.4 Patch available GHSA-4whc-pp4x-9pf3
- jquery-ujs (RubyGems) Vendor— Affected before 1.0.4 Fixed in 1.0.4 Patch available GHSA-4whc-pp4x-9pf3
CPE configurations NVD · 8
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:fedoraproject:fedora:21:*:*:*:*:*:*:* | 21 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:22:*:*:*:*:*:*:* | 22 | Vulnerable | Fedoraproject |
| cpe:2.3:a:rubyonrails:jquery-rails:*:*:*:*:*:*:*:* | up to 3.1.2 | Vulnerable | Rails |
| cpe:2.3:a:rubyonrails:jquery-rails:4.0.0:*:*:*:*:*:*:* | 4.0.0 | Vulnerable | Rails |
| cpe:2.3:a:rubyonrails:jquery-rails:4.0.1:*:*:*:*:*:*:* | 4.0.1 | Vulnerable | Rails |
| cpe:2.3:a:rubyonrails:jquery-ujs:*:*:*:*:*:*:*:* | up to 1.0.3 | Vulnerable | Rails |
| cpe:2.3:o:opensuse:opensuse:13.1:*:*:*:*:*:*:* | 13.1 | Vulnerable | openSUSE |
| cpe:2.3:o:opensuse:opensuse:13.2:*:*:*:*:*:*:* | 13.2 | Vulnerable | openSUSE |
- cpe:2.3:o:fedoraproject:fedora:21:*:*:*:*:*:*:* Versions 21 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:22:*:*:*:*:*:*:* Versions 22 Vulnerable ·Fedoraproject
- cpe:2.3:a:rubyonrails:jquery-rails:*:*:*:*:*:*:*:* Versions up to 3.1.2 Vulnerable ·Rails
- cpe:2.3:a:rubyonrails:jquery-rails:4.0.0:*:*:*:*:*:*:* Versions 4.0.0 Vulnerable ·Rails
- cpe:2.3:a:rubyonrails:jquery-rails:4.0.1:*:*:*:*:*:*:* Versions 4.0.1 Vulnerable ·Rails
- cpe:2.3:a:rubyonrails:jquery-ujs:*:*:*:*:*:*:*:* Versions up to 1.0.3 Vulnerable ·Rails
- cpe:2.3:o:opensuse:opensuse:13.1:*:*:*:*:*:*:* Versions 13.1 Vulnerable ·openSUSE
- cpe:2.3:o:opensuse:opensuse:13.2:*:*:*:*:*:*:* Versions 13.2 Vulnerable ·openSUSE
Remediation
- Fix · GHSA-4whc-pp4x-9pf3 jquery-rails (RubyGems) Fixed in 3.1.3 Advisory →
- Fix · GHSA-4whc-pp4x-9pf3 jquery-rails (RubyGems) Fixed in 4.0.4 Advisory →
- Fix · GHSA-4whc-pp4x-9pf3 jquery-ujs (RubyGems) Fixed in 1.0.4 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| CloudForms Management Engine 5 | Affected | No fix yet |
| Red Hat OpenShift Enterprise 2 | Affected | No fix planned: Will not fix |
| Red Hat Software Collections | Affected | No fix planned: Will not fix |
| Red Hat Subscription Asset Manager | Affected | No fix planned: Will not fix |
Timeline
- 2026-10-02 Threatist record created from CVE-2015-1840
- 2026-10-03 Alias added: GHSA-4whc-pp4x-9pf3
References
Exploit 1
Advisory 7
Other 6
- [oss-security] 20150616 [CVE-2015-1840] CSRF Vulnerability in jquery-ujs and jquery-rails
- https://github.com/rails/jquery-rails
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/jquery-rails/CVE-2015-1840.yml
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/jquery-ujs/CVE-2015-1840.yml
- https://groups.google.com/forum/#!topic/ruby-security-ann/XIZPbobuwaY
- https://web.archive.org/web/20200228084945/http://www.securityfocus.com/bid/75239
Sources
- CVE-2015-1840 · CVE Program
- CVE-2015-1840 · NVD
- FIRST EPSS
- GHSA-4whc-pp4x-9pf3 · GitHub Advisory Database · CC BY 4.0
- CVE-2015-1840 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences