GHSA-x77j-w7wf-fjmw
Vulnerability from github
Published
2023-04-20 21:19
Modified
2024-11-26 18:54
Severity ?
6.1 (Medium) - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
5.3 (Medium) - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
5.3 (Medium) - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
VLAI Severity ?
Summary
Nunjucks autoescape bypass leads to cross site scripting
Details
Impact
In Nunjucks versions prior to version 3.2.4, it was possible to bypass the restrictions which are provided by the autoescape functionality. If there are two user-controlled parameters on the same line used in the views, it was possible to inject cross site scripting payloads using the backslash \
character.
Example
If the user-controlled parameters were used in the views similar to the following: ```
let testObject = { lang: '{{ lang }}', place: '{{ place }}' };```
It is possible to inject XSS payload using the below parameters:
https://<application-url>/?lang=jp\&place=};alert(document.domain)//
Patches
The issue was patched in version 3.2.4.
References
- https://bugzilla.mozilla.org/show_bug.cgi?id=1825980
{ "affected": [ { "package": { "ecosystem": "npm", "name": "nunjucks" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "3.2.4" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2023-2142" ], "database_specific": { "cwe_ids": [ "CWE-79" ], "github_reviewed": true, "github_reviewed_at": "2023-04-20T21:19:24Z", "nvd_published_at": "2024-11-26T12:15:18Z", "severity": "MODERATE" }, "details": "### Impact\nIn Nunjucks versions prior to version 3.2.4, it was possible to bypass the restrictions which are provided by the autoescape functionality. If there are two user-controlled parameters on the same line used in the views, it was possible to inject cross site scripting payloads using the backslash `\\` character.\n\n#### Example\nIf the user-controlled parameters were used in the views similar to the following:\n```\n\u003cscript\u003e\nlet testObject = { lang: \u0027{{ lang }}\u0027, place: \u0027{{ place }}\u0027 };\n\u003c/script\u003e\n```\n\nIt is possible to inject XSS payload using the below parameters:\n```\nhttps://\u003capplication-url\u003e/?lang=jp\\\u0026place=};alert(document.domain)//\n```\n\n### Patches\nThe issue was patched in version 3.2.4.\n\n### References\n\n- https://bugzilla.mozilla.org/show_bug.cgi?id=1825980\n", "id": "GHSA-x77j-w7wf-fjmw", "modified": "2024-11-26T18:54:25Z", "published": "2023-04-20T21:19:24Z", "references": [ { "type": "WEB", "url": "https://github.com/mozilla/nunjucks/security/advisories/GHSA-x77j-w7wf-fjmw" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-2142" }, { "type": "WEB", "url": "https://github.com/mozilla/nunjucks/pull/1437" }, { "type": "WEB", "url": "https://github.com/mozilla/nunjucks/commit/ec16d210e7e13f862eccdb0bc9af9f60ff6749d6" }, { "type": "WEB", "url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1825980" }, { "type": "PACKAGE", "url": "https://github.com/mozilla/nunjucks" }, { "type": "WEB", "url": "https://github.com/mozilla/nunjucks/releases/tag/v3.2.4" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "type": "CVSS_V3" }, { "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N", "type": "CVSS_V4" } ], "summary": "Nunjucks autoescape bypass leads to cross site scripting" }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…