CVE-2024-22199 Django Template Engine Vulnerable to XSS
Attackers can execute malicious scripts in users' browsers via XSS in the Go Fiber template engine when autoescape is disabled.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-22199?
CVE-2024-22199 is a critical cross-site scripting vulnerability in gofiber template, published on 11 Jan 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
This 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.
Which versions are affected by CVE-2024-22199?
3 open source packages ship an affected version, including github.com/gofiber/template/django/v3. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/gofiber/template/django/v3 Go | All versions | 3.1.9 |
github.com/gofiber/template/django/v3 Go | All versions | 3.1.9 |
github.com/gofiber/template/django/v3 Go | All versions | 3.1.9 |
Products include Gofiber Django.
How do I fix CVE-2024-22199?
Upgrade github.com/gofiber/template/django/v3 to 3.1.9 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2024-22199 being exploited?
There is no known exploitation of CVE-2024-22199 in the wild and no public exploit code.
Sources
Also known as GHSA-4mq2-gc4j-cmw6, GO-2024-2461.