{"id":"CVE-2024-22199","aliases":["CVE-2024-22199","GHSA-4mq2-gc4j-cmw6","GO-2024-2461"],"related":[],"kind":"vulnerability","state":"published","title":"Django Template Engine Vulnerable to XSS","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\n**Vulnerability Type:** Cross-Site Scripting (XSS)  \n**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.\n\n### Patches\n\nThe 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.\n\n### Workarounds\n\nFor 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:\n```django\n{% autoescape on %}\n{{ \"<script>alert('xss');</script>\" }}\n{% endautoescape %}\n```\n\n### References\n\n- Official documentation of the Django template engine for Fiber: https://docs.gofiber.io/template/django/\n- Django built-in template tags: https://docs.djangoproject.com/en/5.0/ref/templates/builtins/","format":"markdown","source":"ghsa"},{"lang":"en","text":"Cross-site scripting in github.com/gofiber/template/django/v3","format":"markdown","source":"go"},{"lang":"es","text":"Este paquete proporciona métodos universales para usar múltiples motores de plantillas con el framework web de Fiber mediante la interfaz de Views. Esta vulnerabilidad afecta específicamente a las aplicaciones web que procesan datos proporcionados por el usuario a través de este motor de plantillas, lo que podría provocar la ejecución de scripts maliciosos en los navegadores de los usuarios cuando visitan las páginas web afectadas. La vulnerabilidad se ha abordado, el motor de plantillas ahora tiene de forma predeterminada el escape automático configurado en \"true\", mitigando efectivamente el riesgo de ataques XSS.","source":"nvd"}],"published":"2024-01-11T16:41:42.000Z","modified":"2026-09-10T03:50:04.688Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N","score":9.3,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N","score":9.3,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-20","CWE-79","CWE-116"],"affected":[{"ranges":[{"version":"< 3.1.9","status":"affected"}],"vendor":"gofiber","product":"template","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.1.9"}],"ecosystem":"Go","package":"github.com/gofiber/template/django/v3","purl":"pkg:golang/github.com/gofiber/template/django/v3","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.1.9"}],"ecosystem":"Go","package":"github.com/gofiber/template/django/v3","purl":"pkg:golang/github.com/gofiber/template/django/v3","source":"go"},{"ranges":[{"status":"affected","fixed":"3.1.9"}],"vendor":"gofiber","product":"django","cpe":"cpe:2.3:a:gofiber:django:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/gofiber/template/security/advisories/GHSA-4mq2-gc4j-cmw6","tags":["mitigation","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/gofiber/template/commit/28cff3ac4d4c117ab25b5396954676d624b6cb46","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-22199","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/gofiber/template","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2024-11-14T14:45:35.643Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-22199","url":"https://www.cve.org/CVERecord?id=CVE-2024-22199","licence":"CVE Terms of Use","modified":"2024-11-14T14:45:58.669Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4mq2-gc4j-cmw6","url":"https://github.com/advisories/GHSA-4mq2-gc4j-cmw6","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:04.688Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-2461","url":"https://pkg.go.dev/vuln/GO-2024-2461","licence":"CC-BY-4.0","modified":"2024-05-20T16:03:47.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-22199","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-22199","licence":"Public domain","modified":"2026-06-17T07:10:55.480Z"}],"updatedAt":"2026-11-25T22:58:36.035Z","epss":{"score":0.00484,"percentile":0.43331,"date":"2026-12-01T12:00:22.000Z"}}