Lucene search

K
githubGitHub Advisory DatabaseGHSA-4MQ2-GC4J-CMW6
HistoryJan 11, 2024 - 4:41 p.m.

Django Template Engine Vulnerable to XSS

2024-01-1116:41:42
CWE-20
CWE-79
CWE-116
GitHub Advisory Database
github.com
8
cross-site scripting
django
fiber
web applications
security update

9.3 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

HIGH

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N

5.7 Medium

AI Score

Confidence

High

0.001 Low

EPSS

Percentile

22.9%

Impact

Vulnerability Type: Cross-Site Scripting (XSS) Affected Users: All users of the Django template engine for Fiber prior to the patch. This vulnerability specifically impacts web applications that render user-supplied data through this template engine, potentially leading to the execution of malicious scripts in users’ browsers when visiting affected web pages.

Patches

The vulnerability has been addressed. The template engine now defaults to having autoescape set to true, effectively mitigating the risk of XSS attacks. Users are advised to upgrade to the latest version of the Django template engine for Fiber, where this security update is implemented. Ensure that the version of the template engine being used is the latest, post-patch version.

Workarounds

For users unable to upgrade immediately to the patched version, a workaround involves manually implementing autoescaping within individual Django templates. This method includes adding specific tags in the template to control autoescape behavior:

{% autoescape on %}
{{ "<script>alert('xss');</script>" }}
{% endautoescape %}

References

Affected configurations

Vulners
Node
gofiberdjangoRange<3.1.9go

9.3 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

HIGH

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N

5.7 Medium

AI Score

Confidence

High

0.001 Low

EPSS

Percentile

22.9%

Related for GHSA-4MQ2-GC4J-CMW6