Loading...
Skip to main content

CVE-2024-22199 — Vulnerability in...

CRITICAL

Django Template Engine Vulnerable to XSS

Published January 11, 2024Updated September 10, 2026Source: osv

Summary

### 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/

Advisory Timeline

  • First published January 11, 2024 (1005 days ago).
  • Last revised September 10, 2026 — 972 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/gofiber/template/django/v3 to 3.1.9 or later
go get github.com/gofiber/template/django/v3@v3.1.9

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: go (1).

PackageEcosystemAffectedFixed In
github.com/gofiber/template/django/v3
go
All versions3.1.9

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-116
    Improper Encoding or EscapingMITRE
  • CWE-20
    Improper Input ValidationMITRE
  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.3 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
High
Availability
None

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

Frequently Asked Questions

What is CVE-2024-22199?
Django Template Engine Vulnerable to XSS This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.3/10).
How do I check if my project is affected by CVE-2024-22199?
CVE-2024-22199 affects github.com/gofiber/template/django/v3. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-22199 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.3

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-4mq2-gc4j-cmw6
GO-2024-2461

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies