Vulnerabilities in pkg:npm/jquery-ujs
PACKAGEGHSA-6qqj-rx4w-r3cj is a MODERATE (CVSS 6.5) csrf vulnerability vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Jquery ujs libraries in the npm ecosystem. The issue involves csrf vulnerability in jquery-ujs. Remediation is available by upgrading affected packages to version 1.0.4.
pkg:npm/jquery-ujs
Vulnerability advisories affecting package pkg:npm/jquery-ujs. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-6qqj-rx4w-r3cj | - | MODERATE | CSRF Vulnerability in jquery-ujs |
GHSA-6qqj-rx4w-r3cj at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix GHSA-6qqj-rx4w-r3cj
To remediate this vulnerability, upgrade all affected Jquery ujs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install jquery-ujs@1.0.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls jquery-ujs
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-6qqj-rx4w-r3cj, inspect your project dependencies using npm:
npm ls jquery-ujs
Analyze the terminal output to locate any version of Jquery ujs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.4), your application is affected.
Note: The npm ls jquery-ujs command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Jquery ujs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-6qqj-rx4w-r3cj Affected Jquery ujs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jquery-ujs
|
npm |
< 1.0.4
|
1.0.4
|
References
Frequently Asked Questions
What is GHSA-6qqj-rx4w-r3cj?
Which Jquery ujs versions are affected?
What version fixes GHSA-6qqj-rx4w-r3cj?
Is jquery-ujs affected?
What is the CVSS score of GHSA-6qqj-rx4w-r3cj?
What CWE is associated with GHSA-6qqj-rx4w-r3cj?
How can I check npm dependencies for GHSA-6qqj-rx4w-r3cj?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6qqj-rx4w-r3cj",
"modified" : "2021-09-23T19:45:13Z",
"published" : "2020-08-31T22:48:44Z",
"aliases" : [ ],
"summary" : "CSRF Vulnerability in jquery-ujs",
"details" : "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.\n\nWhen an attacker controls the href attribute of an anchor tag, or\nthe action attribute of a form tag triggering a POST action, the attacker can set the\nhref 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.\n\n\n## Recommendation\n\nUpgrade jquery-ujs to version 1.0.4 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jquery-ujs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.0.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://hackerone.com/reports/49935"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/#!msg/rubyonrails-security/XIZPbobuwaY/fqnzzpuOlA4J"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/npm:jquery-ujs:20150624"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/15"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-352" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:07:52Z",
"nvd_published_at" : null
}
}