CVE-2026-16100 in Keycloakinfo

Summary

by MITRE • 08/05/2026

A flaw was found in the user-event metrics recording of Keycloak. When metrics are enabled, the system records raw error messages from failed account operations as Prometheus metric labels. Because these error messages can include user-supplied input like nonexistent client IDs, an authenticated user can create a massive number of unique metric entries, eventually exhausting system memory and causing the service to crash or become unavailable.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 08/05/2026

This vulnerability resides within Keycloak's metrics collection mechanism where user-event data is recorded as Prometheus labels. The flaw stems from insufficient input sanitization and validation when processing error messages from failed account operations. When metrics are enabled, the system directly incorporates raw error strings into metric labels without proper filtering or encoding, creating a path for malicious input manipulation. This design decision violates fundamental security principles around input validation and data sanitization, as outlined in CWE-20 and CWE-117. The vulnerability represents a classic case of insecure data handling where user-controllable inputs are directly embedded into system monitoring components.

The technical exploitation occurs when an authenticated user leverages the metric recording functionality to submit crafted requests containing malicious payloads in fields such as client IDs or other operational parameters. These payloads contain special characters, control sequences, or extended input that when processed and stored as label values create unique metric entries. The Prometheus metric system's label structure allows for arbitrary string values which can grow exponentially with each unique input combination. This creates a denial of service scenario where the system's memory consumption increases linearly with each distinct malformed request. The vulnerability specifically targets resource exhaustion rather than direct code execution, making it particularly insidious as it can be triggered by legitimate authenticated users without requiring elevated privileges.

The operational impact extends beyond simple service disruption to encompass broader system stability and monitoring integrity concerns. When the system becomes overwhelmed by excessive metric entries, it experiences memory exhaustion that affects not just the metrics collection component but potentially the entire Keycloak service. This creates cascading failures where legitimate monitoring data becomes corrupted or unavailable, undermining the very purpose of the metrics system. The vulnerability also affects compliance and audit requirements as the corrupted metric data may obscure genuine operational issues or security events. From an attack perspective, this represents a low-effort, high-impact vector that aligns with ATT&CK technique T1499.004 for network denial of service attacks and T1566.002 for credential access through service exploitation.

Mitigation strategies must address both immediate protection and long-term architectural improvements. The most effective immediate solution involves implementing strict input validation and sanitization for all metric label values, ensuring that user-supplied inputs are properly encoded or truncated before being stored as labels. Organizations should configure Keycloak to disable metrics collection during high-risk operations or implement rate limiting on metric generation. Additionally, system administrators should monitor memory consumption patterns and establish automated alerts when metric storage approaches capacity thresholds. The implementation of input normalization techniques such as hash-based labeling or fixed-length truncation can prevent the creation of excessively large label values while maintaining monitoring utility. Long-term architectural improvements should include adopting more robust metrics aggregation systems that can handle variable input sizes gracefully without compromising system stability, following security best practices from both NIST SP 800-163 and ISO/IEC 27001 standards for secure information management.

Responsible

Redhat

Reservation

07/17/2026

Disclosure

08/05/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!