0.5low
Authelia: Improper Neutralization of Input During Web Page Generation Leads to Potential Cross-site Scripting
- Severity
- 0.5low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.22% (higher than 13% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-gmfg-3v4q-9qr4GO-2026-4818
Description
Authelia is an open-source authentication and authorization server providing two-factor authentication and single sign-on (SSO) for applications via a web portal. In version 4.39.15, an attacker may potentially be able to inject javascript into the Authelia login page if several conditions are met simultaneously. Unless both the `script-src` and `connect-src` directives have been modified it's almost impossible for this to have a meaningful impact. However if both of these are and they are done so without consideration to their potential impact; there is a are situations where this vulnerability could be exploited. This is caused to the lack of neutralization of the `langauge` cookie value when rendering the HTML template. This vulnerability is likely difficult to discover though fingerprinting due to the way Authelia is designed but it should not be considered impossible. The additional requirement to identify the secondary application is however likely to be significantly harder to identify along side this, but also likely easier to fingerprint. Users should upgrade to 4.39.16 or downgrade to 4.39.14 to mitigate the issue. The overwhelming majority of installations will not be affected and no workarounds are necessary. The default value for the Content Security Policy makes exploiting this weakness completely impossible. It's only possible via the deliberate removal of the Content Security Policy or deliberate inclusion of clearly noted unsafe policies.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| authelia authelia | = 4.39.15, 4.39.15 | CVE List, NVD |
| github.com/authelia/authelia/v4 (Go) | from 4.39.15 before 4.39.16 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/authelia/authelia (Go) | all versions | Go Vulnerability Database |
All scores
| GitHub_M | 0.5low CVSS:4.0 | CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N/E:U |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N/E:U/S:N/AU:Y/R:U/V:D/RE:L/U:Clear |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Authelia is an open-source authentication and authorization server providing two-factor authentication and single sign-on (SSO) for applications via a web portal. In version 4.39.15, an attacker may potentially be able to inject javascript into the Authelia login page if several conditions are met simultaneously. Unless both the `script-src` and `connect-src` directives have been modified it's almost impossible for this to have a meaningful impact. However if both of these are and they are done so without consideration to their potential impact; there is a are situations where this vulnerability could be exploited. This is caused to the lack of neutralization of the `langauge` cookie value when rendering the HTML template. This vulnerability is likely difficult to discover though fingerprinting due to the way Authelia is designed but it should not be considered impossible. The additional requirement to identify the secondary application is however likely to be significantly harder to identify along side this, but also likely easier to fingerprint. Users should upgrade to 4.39.16 or downgrade to 4.39.14 to mitigate the issue. The overwhelming majority of installations will not be affected and no workarounds are necessary. The default value for the Content Security Policy makes exploiting this weakness completely impossible. It's only possible via the deliberate removal of the Content Security Policy or deliberate inclusion of clearly noted unsafe policies.
GitHub Advisory Database
Impact
Official Weighted Severity Rating: Low
This exploit is very unlikely to be the case for most users as it requires configuration of the Content Security Policy template value. Below represents a safe value, any other value other than unconfigured should be very carefully evaluated regardless of the fix.
server:
headers:
csp_template: ''
AUTHELIA_SERVER_HEADERS_CSP_TEMPLATE=
Provided the following conditions are met:
- The Content Security Policy:
- Has been disabled or modified from the entirely safe default value; and
- Has been completely disabled by the Administrator by omitting the header explicitly at the proxy (worst practice); or
- Has been effectively disabled by modifying
script-srcallowing unsafe inline scripts rather than using hashes AND effectively disabled by modifyingconnect-srcallowing connections to arbitrary websites.
- Authelia is being hosted on a domain that has other applications that can write to the cookie for the Authelia domain.
- One of the other applications noted in 2 has an vulnerability that can be exploited to execute malicious javascript with similar requirements to 1.
- The attacker can exploit the javascript in 3 to delete the existing
languagecookie scoped to the fully qualified domain name of Authelia with the same site value ofstrict(which is not possible in most scenarios unless the application in 3 has the exact same domain or a subdomain of the Authelia domain). - The attacker can exploit the javascript in 3 to write a new
languagecookie scoped for a domain that Authelia is sent cookies for. - The attacker can get a user to meet the conditions required to execute the javascript in 3.
- You are running Authelia 4.39.15.
An attacker may potentially be able to inject javascript into the Authelia login page. Unless both the script-src and connect-src directives have been modified it's almost impossible for this to have a meaningful impact. However if both of these are and they are done so without consideration to their potential impact; there is a are situations where this vulnerability could be exploited.
This is caused to the lack of neutralization of the langauge cookie value when rendering the HTML template.
This vulnerability is likely difficult to discover though fingerprinting due to the way Authelia is designed but it should not be considered impossible. The additional requirement to identify the secondary application is however likely to be significantly harder to identify along side this, but also likely easier to fingerprint.
Patches
Upgrade to 4.39.16 or Downgrade to 4.39.14.
Proof of Concept
No current proof of concept exists that does not require manual manipulation of the browser which is effectively a local attack where all privileges have been compromised without the need for this attack vector (i.e. installation of userscripts or a browser plugin which would be able to compromise any website or web app). There is a decent chance one will exist or certain conditions exist that could lead to the vulnerability being exploitable.
Discovery of this flaw has prompted an deliberate evaluation of any other potential flaws similar to this which did not yield any results, as well as a deliberate evaluation of best practices in this area which has resulted in a minor tweak to hardening measures. These additional hardening measures should not have any effect (explicit definition of the script-src and connect-src policies, which are the same value as default was previously), but it should theoretically prevent an accidental change in the future degrading the existing security layers we implement.
Workarounds
The overwhelming majority of installations will not be affected and no workarounds are necessary. The default value for the Content Security Policy makes exploiting this weakness completely impossible. It's only possible via the deliberate removal of the Content Security Policy or deliberate inclusion of clearly noted unsafe policies.
Use the default Content Security Policy
The default Content Security Policy is completely secure and prevents any third party javascript the browser evaluates against it.
server:
headers:
csp_template: ''
Using a custom Content Security Policy is a very advanced choice that requires specialist knowledge. The use of unsafe-inline, unsafe-eval, unsafe-hashes, etc. are particularly problematic as they effectively allow arbitrary script execution (if a security policy includes an option that says unsafe it's probably a good indication you should not use it).
Upgrade or Downgrade
Both the next version and previous version of Authelia do not have this bug.
Go Vulnerability Database
Authelia: Improper Neutralization of Input During Web Page Generation Leads to Potential Cross-site Scripting in github.com/authelia/authelia
NVD (es)
Authelia es un servidor de autenticación y autorización de código abierto que proporciona autenticación de dos factores e inicio de sesión único (SSO) para aplicaciones a través de un portal web. En la versión 4.39.15, un atacante podría potencialmente inyectar javascript en la página de inicio de sesión de Authelia si se cumplen varias condiciones simultáneamente. A menos que se hayan modificado las directivas 'script-src' y 'connect-src', es casi imposible que esto tenga un impacto significativo. Sin embargo, si ambas lo están y se hacen sin considerar su impacto potencial; hay situaciones en las que esta vulnerabilidad podría ser explotada. Esto se debe a la falta de neutralización del valor de la cookie 'langauge' al renderizar la plantilla HTML. Es probable que esta vulnerabilidad sea difícil de descubrir mediante la toma de huellas digitales debido a la forma en que está diseñada Authelia, pero no debe considerarse imposible. El requisito adicional para identificar la aplicación secundaria, sin embargo, es probable que sea significativamente más difícil de identificar junto con esto, pero también probablemente más fácil de identificar mediante la toma de huellas digitales. Los usuarios deben actualizar a la versión 4.39.16 o degradar a la 4.39.14 para mitigar el problema. La abrumadora mayoría de las instalaciones no se verán afectadas y no son necesarias soluciones alternativas. El valor predeterminado de la Política de Seguridad de Contenido (Content Security Policy) hace que explotar esta debilidad sea completamente imposible. Solo es posible mediante la eliminación deliberada de la Política de Seguridad de Contenido o la inclusión deliberada de políticas inseguras claramente señaladas.
References
| https://github.com/authelia/authelia/security/advisories/GHSA-gmfg-3v4q-9qr4 | advisory, exploit, mitigation, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-33525 | advisory | |
| https://github.com/authelia/authelia | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-33525 changed 2026-03-30 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-gmfg-3v4q-9qr4 changed 2026-03-30 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4818 changed 2026-03-26 | CC-BY-4.0 |
| NVD | CVE-2026-33525 changed 2026-06-17 | Public domain |