CVE-2020-15153
Executive Summary
CVE-2020-15153 is an unauthenticated SQL injection vulnerability in Ampache, an open-source web-based audio/video streaming application and content management system, affecting all versions prior to 4.2.2. The vulnerability allows remote, unauthenticated attackers to inject arbitrary SQL queries into database operations, potentially leading to full database compromise, credential exfiltration, and account takeover. The issue is fixed in version 4.2.2 and the development branch, though no patch evidence has been confirmed from tracked sources as of this report's generation; immediate upgrade to a patched version is mandatory for any exposed Ampache deployment.
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
Technical Analysis
Ampache is a self-hosted media streaming platform written in PHP that manages large media libraries and provides user-facing interfaces for browsing, playing, and downloading audio and video content. The application typically integrates with an SQL backend (MySQL/MariaDB) to store user credentials, session data, media metadata, playlists, and access control lists.
The CVE-2020-15153 vulnerability is classified as an unauthenticated SQL injection. Based strictly on the NVD description, the following facts are established:
Pre-authentication exploitation: The NVD description explicitly states that "unauthenticated users" can perform SQL injection. This indicates the vulnerable code path is reachable without any prior authentication — meaning the entry point is in a public-facing component of the application (e.g., login, registration, session management, or a public API endpoint).
Affected scope: All versions before 4.2.2 are vulnerable. The development branch has also been fixed, indicating the maintainers identified and remediated the flaw after version 4.2.2 was released.
No specific technical details: The NVD description references a GitHub Security Advisory for "details and a workaround" but does not provide the function names, parameter names, or exact URL endpoints involved. Therefore, the exact vulnerable code path cannot be identified from the provided data.
Vulnerability mechanism at the class level: SQL injection occurs when user-controlled input is concatenated directly into SQL query strings without proper parameterization or escaping. In this case, because the injection is reachable pre-authentication, the vulnerable query is likely part of a login flow, session initialization, a public search or API endpoint, or a registration form. The attacker can manipulate the SQL query structure to alter its logic — for example, appending OR 1=1 to bypass authentication, or using stacked queries (if supported by the DB driver) to execute arbitrary data-modification or data-exfiltration statements.
Attack surface: The attack surface is any publicly accessible Ampache web interface. Because Ampache is self-hosted, installations are typically exposed on the internet on HTTP/HTTPS ports (80/443), though they may also be present on non-standard ports. The unauthenticated nature of the flaw significantly widens the exposure — any internet-reachable instance is a candidate target with no prior access required.
Unknown details: The specific vulnerable endpoint, parameter names, and the database driver's behavior regarding stacked queries are not disclosed in the NVD description. Insufficient technical detail is available to pinpoint the exact SQL query structure or injection point. The referenced GitHub Security Advisory may contain this information, but it is not included in the provided data.
Exploitation Scenarios
No public PoC is available; the attack chain is inferred from the vulnerability class (unauthenticated SQL injection). The following describes a plausible attack path based strictly on the known facts:
Step 1 — Reconnaissance and target identification. An attacker identifies internet-facing Ampache instances using search engines (e.g., Shodan queries such as http.title:"Ampache"), port scans, or Google dorking (e.g., searching for the login page or distinctive HTML content generated by Ampache). The attacker then confirms the target is running a version prior to 4.2.2 via version disclosure in HTTP headers, README files, changelogs, or login page footers.
Step 2 — Triggering the flaw. The attacker crafts an HTTP request to a public-facing endpoint of the application — likely a login page, registration form, or public API — that processes user-supplied parameters before authentication. Because the SQL injection is unauthenticated, no prior session or credentials are required. The attacker injects SQL metacharacters (single quotes, comment sequences, stacked query delimiters) into the parameter value to test for database error messages indicating a broken query, confirming the injection point exists.
Step 3 — Payload execution. At the vulnerability-class level, the attacker manipulates the SQL query logic. Typical payloads include:
- Authentication bypass:
' OR '1'='1appended to a username or password field to satisfy the WHERE clause and grant access to the application without valid credentials. - Data exfiltration: Union-based injection (
UNION SELECTstatements) to retrieve data from other tables, such asusers(username/password hashes),sessions, or configuration tables. - Blind injection: If error messages are suppressed, the attacker uses time-based or boolean-based blind injection techniques to infer data bit-by-bit by observing differences in response times or page content.
Step 4 — Post-exploitation impact. Successful exploitation allows the attacker to extract sensitive data from the database, including:
- User credentials (stored as plaintext or hashed passwords).
- Session tokens, enabling session hijacking.
- Media library metadata and potentially DRM-restricted content information.
- Application configuration data, which may include database connection strings, API keys, or SMTP credentials.
If the database user account has file-write privileges and stacked queries are supported, the attacker could potentially write files to the web server's filesystem, achieving remote code execution. However, this depends on database server configuration and cannot be confirmed from the provided data.
Impact Assessment
CVSS score (8.2) analysis: The score reflects a HIGH severity vulnerability with network attack vector, low attack complexity, no privileges required, and no user interaction. The scope is unchanged; the primary impact is high confidentiality loss (full database read access). Integrity and availability impact are likely limited because SQL injection typically allows data read/write but not direct system control, though stacked queries could escalate the impact depending on environment.
Business impact:
- Data breach: Complete exposure of user databases, including credentials, personal data, and media access rights.
- Account takeover: Harvested passwords or session tokens allow attackers to impersonate legitimate users, including administrators.
- Regulatory exposure: If PII (names, email addresses, IP logs) is stored, a breach may trigger GDPR, HIPAA, or other regulatory notification obligations.
- Ransom/extortion: Attackers may copy databases and threaten to release or delete data unless paid.
- Availability disruption: Although less likely, attackers could use modified SQL statements to corrupt or delete database contents, rendering the service inoperable.
Blast radius: Any organization running a self-hosted Ampache media server on the internet is in scope. Internal deployments are also at risk if the web UI is reachable within the corporate network. The lack of authentication requirement means the entire exposed install base is vulnerable without any additional exploitation steps.
EPSS note: With an EPSS score of 0.02398 (82.4% percentile), the likelihood of exploitation in the wild is moderate, indicating observed exploitation activity relative to known CVEs is above average. This warrants immediate prioritization despite the older publication date.
Detection Guidance
The following detection rules target the network and host-level indicators of SQL injection attempts against Ampache endpoints. These rules are generic and based on the vulnerability class; they should be tuned to the specific environment and may produce false positives from legitimate application traffic.
Sigma Rule
title: Suspicious SQL Injection Attempts Against Ampache
id: 7c1a3c90-3a7e-4c9d-9d2e-6b1f7a2c8d2e
status: experimental
description: Detects HTTP requests to Ampache endpoints containing common SQL injection patterns, indicating potential exploitation of CVE-2020-15153 or similar flaws.
author: Valters IT Security Research
date: 2024-05-30
references:
- https://nvd.nist.gov/vuln/detail/CVE-2020-15153
logsource:
category: webserver
product: apache
definition: HTTP access logs from web servers hosting Ampache
detection:
selection_user_agent:
# Generic SQLi indicator keywords in URL or POST body
url_query|contains:
- "'"
- "\""
- "UNION"
- "SELECT"
- "OR 1=1"
- "OR '1'='1"
- "sleep("
- "benchmark("
- "information_schema"
- "xp_cmdshell"
- "concat("
- "group_concat("
http_method:
- "GET"
- "POST"
condition: selection_user_agent
falsepositives:
- Legitimate search queries containing apostrophes or the word "select"
- Application-generated URLs with SQL keywords in parameters
level: medium
tags:
- attack.t1190
- cve.2020-15153
- cwe.89
YARA Rule
rule CVE_2020_15153_Ampache_SQLi_Attempts
{
meta:
author = "Valters IT Security Research"
description = "Detects HTTP payloads containing SQL injection patterns targeting Ampache"
cve = "CVE-2020-15153"
severity = "high"
date = "2024-05-30"
strings:
$sqli1 = "OR 1=1" ascii nocase
$sqli2 = "' OR '" ascii nocase
$sqli3 = "UNION SELECT" ascii nocase
$sqli4 = "information_schema" ascii nocase
$sqli5 = "sleep(" ascii nocase
$sqli6 = "benchmark(" ascii nocase
$sqli7 = "concat(" ascii nocase
$sqli8 = "group_concat(" ascii nocase
$sqli9 = "/ampache/" ascii nocase
$sqli10 = "player_api" ascii nocase
$sqli11 = "login" ascii nocase
condition:
any of ($sqli1, $sqli2, $sqli3, $sqli4, $sqli5, $sqli6, $sqli7, $sqli8) and
any of ($sqli9, $sqli10, $sqli11)
}
Suricata IDS Rule
alert http any any -> any any (
msg:"ET EXPLOIT Possible Ampache Unauthenticated SQL Injection (CVE-2020-15153)";
flow:established,to_server;
content:"/login.php"; http_uri;
content:"username="; http_client_body;
content:"'"; http_client_body;
pcre:"/username=.*(?:OR|UNION|SELECT|WAITFOR|BENCHMARK).*/Ui";
sid:20200015153;
rev:1;
metadata:attack_target Web_Server, deployment Perimeter, tag CVE-2020-15153, cve CVE-2020-15153, tag SQL_Injection, signature_severity High;
reference:url, https://nvd.nist.gov/vuln/detail/CVE-2020-15153;
)
Elastic Detection
// EQL query for Elastic SIEM — detects HTTP POST requests with SQLi patterns to Ampache endpoints
sequence by host.name, source.ip with maxspan=5m
[network where event.category == "web" and network.protocol == "http" and
http.request.method == "POST" and
http.request.body.content : "*' OR 1=1*" or
http.request.body.content : "*UNION SELECT*" or
http.request.body.content : "*sleep(*" or
http.request.body.content : "*information_schema*"]
[network where event.category == "web" and network.protocol == "http" and
url.path : "/login.php" or url.path : "/register.php" or url.path : "*ampache*"]
Splunk SPL Query
index=web sourcetype=access_combined
| search (uri_path="/login.php" OR uri_path="/register.php" OR uri_path="*ampache*")
AND (form_data="*OR 1=1*" OR form_data="*UNION SELECT*" OR form_data="*' OR '*"
OR form_data="*sleep(*" OR form_data="*benchmark(*" OR form_data="*information_schema*")
| stats count by src_ip, uri_path, form_data, http_method
| sort - count
| table _time, src_ip, uri_path, http_method, form_data, count
Wazuh OSSEC Rule
<group name="ampache,">
<rule id="100530" level="10" frequency="5" timeframe="60">
<if_sid>31100</if_sid>
<match>OR 1=1|UNION SELECT|information_schema|sleep\(|benchmark\(|concat\(|group_concat\(</match>
<description>Ampache possible SQL injection attempt detected (CVE-2020-15153)</description>
<group>attack.t1190,sqli,</group>
<mitre>
<id>T1190</id>
</mitre>
</rule>
</group>
Mitigation & Patch Guidance
Patch confidence: 0/4 — UNPATCHED. No patch evidence has been confirmed from any tracked public source. The NVD description states the fix exists in version 4.2.2 and the development branch, but no vendor advisory or official patch/changelog has been captured by the tracked sources at the time of this report. Organizations should verify the actual fix by reviewing the Ampache GitHub repository and release notes manually.
1) Immediate Mitigations (to deploy before patching)
- Restrict network access: Place the Ampache web interface behind a VPN, IP allowlist, or reverse proxy with IP filtering. Do not expose it directly to the internet.
- Web Application Firewall (WAF): Deploy a WAF with SQL injection signature rules in front of Ampache. Configure blocking mode for common SQLi payload patterns.
- Database account hardening: Ensure the database user account used by Ampache has minimal privileges — revoke
DROP,CREATE,ALTER,FILE, andGRANTprivileges. Restrict toSELECT,INSERT,UPDATE,DELETEon the Ampache schema only. - Disable stacked queries: If using MySQL, run the database user with the
MULTI_STATEMENTSoption disabled (default in most PHP drivers), preventing stacked-query injection attacks. - Monitor access logs: Actively review web server logs for anomalous SQL-related payloads (as per the detection rules above) and respond to any hits.
2) Patch / Upgrade Steps
- Upgrade to Ampache 4.2.2 or later. This is the only confirmed vulnerable-versions remediation per the NVD description.
- If 4.2.2 is not available from your package repository, pull the latest release from the official GitHub repository (
https://github.com/ampache/ampache). - After upgrading, verify the application version in the admin panel or via a version check endpoint, and run a database schema migration if the upgrade process requires it.
- If upgrading is not immediately possible, apply the workaround referenced in the GitHub Security Advisory (as referenced by the NVD description) — exact details are unavailable in the provided data; refer to the advisory directly.
3) Long-Term Hardening
- Establish a patch management lifecycle: Subscribe to Ampache release notifications and GitHub security advisories. Test and deploy security patches within 24–48 hours of release for internet-facing systems.
- Implement robust input validation: Ensure all database queries in the application use prepared statements or parameterized queries. Review custom plugins/modifications for raw SQL string concatenation.
- Enable SQL error suppression: Configure the application and database to suppress detailed SQL error messages, reducing information disclosure that aids injection.
- Run regular security scans: Integrate DAST/SAST tools into your CI/CD pipeline to detect injection points before deployment.
- Network segmentation: Keep media servers on a separate network segment from corporate production systems to limit lateral movement if compromised.
References
- NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2020-15153 — Official NVD record with description, CVSS score, and associated references.
- GitHub Security Advisory (referenced in NVD description): The advisory referenced as the source of "details and a workaround" — searchable via the Ampache GitHub repository's security tab. Exact URL not included in the provided CVE data.
- Ampache Official Website: https://ampache.org — Vendor site with version history and download links.
- Ampache GitHub Repository: https://github.com/ampache/ampache — Source code repository where the fix was applied to version 4.2.2 and the development branch.
- CISA KEV: Not listed — CVE-2020-15153 is not present in the CISA Known Exploited Vulnerabilities catalog as of this report. There is no confirmed exploit-in-the-wild evidence from tracked sources, though the EPSS percentile (82.4%) suggests above-average likelihood of exploitation. No known threat actor campaigns have been publicly attributed to this CVE.
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.