CVE-2021-20323 is a reflected Cross-Site Scripting (XSS) vulnerability in Keycloak, where user-supplied input in a POST request is not properly sanitized before being reflected in the response. This allows an attacker to inject arbitrary JavaScript code into the context of a user's browser session when the user interacts with a maliciously crafted POST request.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
2 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).
This repository is a Python-based exploitation scanner for CVE-2021-20323, a Cross-Site Scripting (XSS) vulnerability in Keycloak. The tool is structured as a Python package with a command-line interface (CLI) using Click. The main entry point is 'cve202120323/main.py', which provides options to scan a single URL, a list of URLs from a file, output results to a file, configure Telegram notifications, and open a blog post about the vulnerability. The core exploit logic is in 'cve202120323/includes/scan.py', which fetches a list of vulnerable endpoints from a remote file, appends them to the target URL, and sends a crafted JSON payload designed to trigger the XSS vulnerability. If the response indicates the vulnerability is present (by checking for a specific error message and content type), the tool reports the target as vulnerable, optionally sends a notification to a Telegram bot, and writes the result to an output file. Supporting modules handle file reading, output writing, configuration management (including chat ID storage in a YAML file), and user interface banners. The tool is operational and automates the process of identifying Keycloak instances vulnerable to CVE-2021-20323, with additional features for notification and result management. No hardcoded target endpoints are present; the tool is designed for flexible scanning based on user input.
This repository provides a proof-of-concept (POC) exploit for CVE-2021-20323, a reflected XSS vulnerability in Keycloak versions 10.0.0 up to (but not including) 18.0.0. The vulnerability is present in the 'clients-registrations' endpoint, where a POST request with a specially crafted JSON key is reflected in an error message with a 'text/html' content type, enabling XSS if the response is rendered in a browser. The exploit is demonstrated via curl commands in the README, and test instructions are provided using Docker Compose files to spin up vulnerable and patched Keycloak instances. The repository does not contain executable code files; instead, it provides detailed documentation and test setups. Exploitation is only practical if the target's CORS policy is misconfigured to allow cross-origin POST requests with 'application/json' content type. The repository also includes mitigation recommendations and references to official advisories.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
1 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.