Django Template Engine Vulnerable to XSS
cve-program · CVE-2024-22199
PublishedThis package provides universal methods to use multiple template engines with the Fiber web framework using the Views interface. 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. The vulnerability has been addressed, the template engine now defaults to having autoescape set to `true`, effectively mitigating the risk of XSS attacks.
Read the publisher's advisoryeuvd · EUVD-2024-0250
PublishedThis package provides universal methods to use multiple template engines with the Fiber web framework using the Views interface. 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. The vulnerability has been addressed, the template engine now defaults to having autoescape set to `true`, effectively mitigating the risk of XSS attacks.
Read the publisher's advisorynvd · CVE-2024-22199
PublishedThis package provides universal methods to use multiple template engines with the Fiber web framework using the Views interface. 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. The vulnerability has been addressed, the template engine now defaults to having autoescape set to `true`, effectively mitigating the risk of XSS attacks.
Read the publisher's advisoryosv · GHSA-4mq2-gc4j-cmw6
Published### 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: ```django {% autoescape on %} {{ "<script>alert('xss');</script>" }} {% endautoescape %} ``` ### References - Official documentation of the Django template engine for Fiber: https://docs.gofiber.io/template/django/ - Django built-in template tags: https://docs.djangoproject.com/en/5.0/ref/templates/builtins/
Read the publisher's advisoryosv · GO-2024-2461
PublishedCross-site scripting in github.com/gofiber/template/django/v3
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2024-22199 · CVE overview and exploitation status
cve-program · CVE-2024-22199
- https://github.com/gofiber/template/security/advisories/GHSA-4mq2-gc4j-cmw6
- https://github.com/gofiber/template/commit/28cff3ac4d4c117ab25b5396954676d624b6cb46
euvd · EUVD-2024-0250
- https://github.com/gofiber/template/security/advisories/GHSA-4mq2-gc4j-cmw6
- https://github.com/gofiber/template/commit/28cff3ac4d4c117ab25b5396954676d624b6cb46
nvd · CVE-2024-22199
- https://github.com/gofiber/template/commit/28cff3ac4d4c117ab25b5396954676d624b6cb46
- https://github.com/gofiber/template/security/advisories/GHSA-4mq2-gc4j-cmw6
osv · GHSA-4mq2-gc4j-cmw6
- https://github.com/gofiber/template/security/advisories/GHSA-4mq2-gc4j-cmw6
- https://nvd.nist.gov/vuln/detail/CVE-2024-22199
- https://github.com/gofiber/template/commit/28cff3ac4d4c117ab25b5396954676d624b6cb46
- https://github.com/gofiber/template
osv · GO-2024-2461
Related changes
Linked by CVE identifierNo related changes are available here.