CVE-2026-4874

CVE-2026-4874: Server-Side Request Forgery in Keycloak

Verified by Precogs Threat Research
Last Updated: Mar 26, 2026
Base Score
LOW

Executive Summary

CVE-2026-4874 is a low severity vulnerability affecting software systems. It is classified as Server-Side Request Forgery. Ensure your systems and dependencies are patched immediately to mitigate exposure risks.

Precogs AI Insight

"Precogs AI detected this vulnerability pattern in Server-Side Request Forgery implementations. The pattern deviates from documented secure coding standards, suggesting a high likelihood of exploitation if unpatched."

Exploit Probability (EPSS)
Low (0.0%)
Public POC
Undisclosed
Exploit Probability
Low (<10%)
Public POC
Available
Affected Assets
CWE-918

Summary

A low-severity Server-Side Request Forgery vulnerability (CVE-2026-4874) has been identified in Keycloak, the widely-deployed open-source identity and access management platform. An authenticated attacker can abuse server-side HTTP requests to probe internal network services (CWE-918).

Technical Details

The issue is classified under CWE-918 (Server-Side Request Forgery). Keycloak processes user-supplied URLs in certain configuration or federation endpoints without sufficiently restricting the target hostname or IP range. This allows an authenticated user to redirect server-side HTTP requests to internal network addresses.

While the CVSS score is 3.1 (Low) due to the authentication requirement, the real-world impact in cloud environments can be severe when the SSRF is used to access cloud metadata endpoints.

Exploitation Context

  • Vector: Remote / Network-based
  • Authentication: Low (standard user account required)
  • Complexity: High
  • Impact: Low (Confidentiality only)

In cloud environments (AWS, GCP, Azure), SSRF can be escalated to access the instance metadata endpoint (169.254.169.254), stealing temporary IAM credentials that grant access to cloud infrastructure.

Remediation

Keycloak administrators should immediately:

  1. Apply the latest security patches from the Keycloak project that restrict outbound request targets.
  2. Implement network-level controls (firewall rules, security groups) to prevent the Keycloak server from reaching internal services and cloud metadata endpoints.
  3. Deploy SSRF-aware proxy configurations that block requests to RFC 1918 private IP ranges and link-local addresses.

Precogs AI Integration

The Precogs AI Code Security Platform identifies SSRF vulnerabilities by tracing user-controlled URL parameters through to HTTP client execution sinks. Precogs verifies that URL scheme restrictions, hostname whitelisting, and private IP range blocking are enforced before any outbound request is made.

Vulnerability Code Signature

Attack Data Flow

StageDetail
SourceUser-supplied URL parameter
VectorServer fetches the user-controlled URL
SinkHTTP request library (e.g., fetch, axios)
ImpactAccess to internal services, metadata endpoints, or port scanning

Vulnerable Code Pattern

// ❌ VULNERABLE: Server-Side Request Forgery
app.get('/proxy', async (req, res) => {
  const targetUrl = req.query.url;
  // Taint sink: unvalidated outbound request
  const response = await fetch(targetUrl);
  res.send(await response.text());
});

Secure Code Pattern

// ✅ SECURE: Allowlist validation
const ALLOWED_DOMAINS = ['api.partner.com'];
app.get('/proxy', async (req, res) => {
  const targetUrl = new URL(req.query.url);
  
  if (!ALLOWED_DOMAINS.includes(targetUrl.hostname)) {
    return res.status(403).send("Domain not allowed");
  }
  
  // Sanitized outbound request
  const response = await fetch(targetUrl.href);
  res.send(await response.text());
});

How Precogs Detects This

Precogs API Security Engine actively detects SSRF vulnerabilities by tracking unvalidated URL sinks and enforcing strict allowlist policies.\n

Related Vulnerabilitiesvia CWE-918

CVE-2026-3543110 CRITICAL

Server-Side Request Forgery (SSRF) in Server-side request forgery (ssrf) in Microsoft Entra ID Entitlement Management allows an unauthorized attacker to perform spoofing over a network

CWE-918
CVE-2026-322109.3 CRITICAL

Server-Side Request Forgery (SSRF) in Server-side request forgery (ssrf) in Microsoft Dynamics 365 (Online) allows an unauthorized attacker to perform spoofing over a network

CWE-918
CVE-2026-3218610 CRITICAL

Server-Side Request Forgery (SSRF) in Server-side request forgery (ssrf) in Microsoft Bing allows an unauthorized attacker to elevate privileges over a network

CWE-918
CVE-2026-45287.3 HIGH

A vulnerability was determined in trueleaf ApiFlow 0.

CWE-918
CVE-2024-562796.5 MEDIUM

Server-Side Request Forgery (SSRF) — Cloud metadata access

CWE-918
CVE-2025-277747.5 HIGH

Blind SSRF with Arbitrary File Read

CWE-918

Is your system affected?

Precogs AI detects CVE-2026-4874 in compiled binaries, LLMs, and application layers — even without source code access.