CVE-2015-1840: jquery-rails and jquery-ujs subject to Exposure of Sensitive Information
5
CVSS Score
Basic Information
CVE ID
GHSA ID
EPSS Score
0.54761%
CWE
Published
10/24/2017
Updated
8/25/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
AV:N/AC:L/Au:N/C:P/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| jquery-rails | rubygems | < 3.1.3 | 3.1.3 |
| jquery-rails | rubygems | >= 4.0.0, < 4.0.4 | 4.0.4 |
| jquery-ujs | rubygems | < 1.0.4 | 1.0.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper URL handling in jquery-ujs. When extracting URLs from href/action attributes (via $.rails.href), leading spaces were not trimmed, causing URLs like ' https://attacker.com' to be parsed as relative paths. The cross-domain check ($.rails.isCrossDomain) then incorrectly validated these malformed URLs as same-origin, allowing CSRF token transmission. The patches in jquery-ujs 1.0.4 and jquery-rails 3.1.3/4.0.4 addressed this by adding URL normalization (e.g., trimming whitespace), confirming these functions as the root cause.