{"answers":{"affected":"1 open source package ship an affected version, including authentik.","exploited":"There is no known exploitation of CVE-2026-40165 in the wild and no public exploit code.","fix":"Upgrade authentik to a fixed version for your release line: 2025.12.5 or 2026.2.3.","what":"CVE-2026-40165 is a high-severity authentication bypass vulnerability in goauthentik authentik, published on 20 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-40165 and fix it if it is affected.\n\nWhat it is: CVE-2026-40165 is a high-severity authentication bypass vulnerability in goauthentik authentik, published on 20 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-40165 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- authentik (Bitnami): affected all versions; fixed in 2025.12.5, 2026.2.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40165/ (Markdown: https://insights.sbomify.com/CVE-2026-40165/index.md)","id":"CVE-2026-40165","markdown":"https://insights.sbomify.com/CVE-2026-40165/index.md","name":"CVE-2026-40165","record":{"aliases":["BIT-authentik-2026-40165","GHSA-9wj8-xv4r-qwrp"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["account_takeover","privilege_escalation"],"network_reachable":"yes","non_default_config":true,"product_category":"Identity Provider","requires_auth":"none","summary":"Attackers can bypass authentication and access other accounts by injecting XML comments into SAML NameID values on instances with specific SAML configurations.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.7,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-91","name":"XML Injection"},{"id":"CWE-436","name":"Interpretation Conflict"},{"id":"CWE-287","name":"Improper Authentication"}],"description":"authentik is an open-source identity provider. Versions 2025.12.4 and prior, and versions 2026.2.0-rc1 through 2026.2.2 were vulnerable to Authentication Bypass through SAML NameID XML Comment Injection. Due to how authentik extracted the NameID value from a SAML assertion, it was possible for an attacker to trick authentik into only seeing a part of the NameID value, potentially allowing an attacker to gain access to other accounts. This issue could be exploited on an authentik instance with a SAML Source, where the attacker had an account on the SAML Source and the ability to modify their NameID value (commonly username or E-mail), and XML Signing was enabled. The attacker could modify the SAML assertion given to authentik by injecting a comment within the NameID value, which effectively truncated the NameID value to the snippet before the comment, and gave the attacker access to any user account. This issue has been fixed in versions 2025.12.5 and 2026.2.3.","ecosystems":["Bitnami"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"authentik: SAML NameID XML Comment Injection Enables Authentication Bypass via Identifier Truncation","id":"CVE-2026-40165","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"auth_bypass","year":"2026"},"n_packages":1,"n_references":3,"next":{"headline":"authentik: Non-admin user can retrieve confidential OAuth client_secret via /api/v3/oauth2/access_tokens/","id":"CVE-2026-40166"},"packages":[{"ecosystem":"Bitnami","fixed":["2025.12.5","2026.2.3"],"introduced":["0","2026.2.0"],"last_affected":[],"package":"authentik","purl":"pkg:bitnami/authentik","source":"BIT-authentik-2026-40165"}],"prev":{"headline":"jq: Algorithmic complexity DoS via hardcoded MurmurHash3 seed","id":"CVE-2026-40164"},"products":["authentik"],"published":"2026-05-20","related":[],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-05-21","vendors":["goauthentik"]},"summary":"Attackers can bypass authentication and access other accounts by injecting XML comments into SAML NameID values on instances with specific SAML configurations.","url":"https://insights.sbomify.com/CVE-2026-40165/"}