CVE-2025-13579
Executive Summary
CVE-2025-13579 is an SQL injection vulnerability in code-projects Library System 1.0, affecting the /return.php script through manipulation of the ID argument. The flaw carries a CVSS v3.1 base score of 6.3 (Medium) and requires low privileges to exploit, though it can be launched remotely. A public proof-of-concept exists, meaning opportunistic attackers can weaponize it quickly. Organizations running this application are at risk of data compromise and downstream lateral movement.
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
The vulnerability resides in the return.php file of code-projects Library System 1.0. According to the NVD description and CNA title, the application fails to properly neutralize user-controlled input passed to the ID argument. This allows an attacker to inject arbitrary SQL into a backend database query.
The weakness is classified as CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component), reflecting a generic injection flaw that manifests specifically as SQL injection (CWE-89 context). Because the vulnerable parameter is used in a database query without adequate parameterization or escaping, an attacker can alter the logic of that query.
The attack surface is the web-accessible /return.php endpoint. The physical attack vector is network-based (AV:N), and the exploit requires authentication at a low privilege level (PR:L). No user interaction is required (UI:N). The CVSS vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L indicates low confidentiality, integrity, and availability impact within the same security scope.
No public exploit code was provided to this analysis, but the NVD entry explicitly states that "the exploit has been made public." Therefore, the injection mechanism likely involves either a classic in-band UNION-based or error-based payload that manipulates the ID argument, or a time-based blind variant. Without a detailed technical write-up, the exact SQL syntax cannot be confirmed; however, the vulnerability class is well understood.
Exploitation Scenarios
Given that a public exploit exists, the following attack chain is inferred based on the vulnerability class and the exposed return.php endpoint:
Reconnaissance/Target Identification – The attacker scans for code-projects Library System 1.0 instances, typically identified via HTTP response fingerprints such as the page title "Library System" or specific file paths like
/return.php. Shodan or similar internet-wide scanners could be used with the provided dorks to find exposed installations.Triggering the Flaw – The attacker sends a crafted HTTP request to
/return.phpwhere theIDparameter contains SQL metacharacters. For example, a request likeGET /return.php?ID=1'would test for injection. Because the vulnerability is in an "unknown function" of the file, the attacker must first authenticate (PR:L) — possibly as a regular library staff user — then manipulate theIDargument during a book return operation.Payload/Execution Method – At the vulnerability-class level, the attacker supplies a payload that breaks out of the intended SQL query context. Common payloads include
UNION SELECTstatements to extract data from tables such as users, books, or loans, or boolean-based conditions to infer database structure. The exact payload syntax is not documented in the provided data, but the injection point is theIDargument.Post-Exploitation Impact – Successful exploitation allows unauthorized reading of database contents (C:L), modification of data (I:L), and potential disruption of the library system's return function (A:L). An attacker could extract user credentials, borrower records, or inventory data, or tamper with return records to hide theft or manipulate fines.
No public PoC is available in this analysis; the attack chain is inferred from the vulnerability class and NVD description.
Impact Assessment
The CVSS v3.1 base score is 6.3, reflecting a Medium severity. The vector shows low confidentiality, integrity, and availability impacts, all within the same security scope (S:U). The exploitation requires low privileges (PR:L), meaning any authenticated user with basic access to the library system could potentially exploit the flaw. The attack vector is network-based, so the vulnerable system must be reachable over the network.
Business impact includes:
- Data breach: Exposure of user credentials, library member details, or internal operational data.
- Integrity loss: Modification or deletion of records, undermining the reliability of the library management system.
- Availability: Potential to crash or disable the return functionality, disrupting daily operations.
- Blast radius: Limited to the database backing the Library System application; however, extracted credentials could be reused for lateral movement to other systems if the application shares credentials with other enterprise services.
Detection Guidance
Sigma Rule
title: SQL Injection Attempt Against code-projects Library System return.php
id: 9f7b6d4a-3c21-4a5b-8e1f-2d3c4b5a6e7f
status: experimental
description: Detects SQL injection attempts targeting the ID parameter in return.php of code-projects Library System 1.0
author: SOC Team
date: 2025-12-01
tags:
- attack.t1190
- cve.2025-13579
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'GET'
cs-uri-stem: '/return.php'
cs-uri-query|contains:
- 'ID='
keywords:
- "' OR "
- "' AND "
- 'UNION SELECT'
- 'SLEEP('
- 'BENCHMARK('
- 'WAITFOR DELAY'
- '--'
- '#'
condition: selection and keywords
falsepositives:
- Legitimate requests containing apostrophes in the ID parameter (unlikely)
level: high
YARA Rule
rule CVE_2025_13579_Return_PHP_SQLi
{
meta:
description = "Detects SQL injection attempts in return.php against code-projects Library System"
author = "SOC Team"
date = "2025-12-01"
reference = "CVE-2025-13579"
severity = "high"
strings:
$return_php = "/return.php" ascii wide nocase
$id_param = "ID=" ascii wide nocase
$sqli1 = "' OR " ascii wide nocase
$sqli2 = "' AND " ascii wide nocase
$sqli3 = "UNION SELECT" ascii wide nocase
$sqli4 = "SLEEP(" ascii wide nocase
$sqli5 = "BENCHMARK(" ascii wide nocase
$sqli6 = "WAITFOR DELAY" ascii wide nocase
$comment1 = "--" ascii wide
$comment2 = "#" ascii wide
condition:
$return_php and $id_param and 1 of ($sqli*)
}
Suricata IDS Rule
alert http any any -> any any (msg:"CVE-2025-13579 SQL Injection Attempt in return.php (ID parameter)"; flow:to_server,established; content:"/return.php"; http_uri; content:"ID="; http_uri; pcre:"/ID=[^&]*('|%27)/i"; pcre:"/(UNION[\s\+]+SELECT|SLEEP\(|BENCHMARK\(|WAITFOR[\s\+]+DELAY|'[\s\+]+OR[\s\+]+|'[\s\+]+AND[\s\+]+)/i"; reference:cve,2025-13579; reference:url,https://nvd.nist.gov/vuln/detail/CVE-2025-13579; classtype:web-application-attack; sid:100013579; rev:1;)
Elastic Detection
network where
http.request.method == "GET" and
url.path == "/return.php" and
url.query contains "ID=" and
(url.query contains "' OR " or url.query contains "' AND " or url.query contains "UNION SELECT" or url.query contains "SLEEP(" or url.query contains "BENCHMARK(" or url.query contains "WAITFOR DELAY" or url.query contains "--" or url.query contains "#")
Splunk SPL Query
index=web sourcetype=access_combined
| where match(uri_path, "return\.php") AND match(uri_query, "ID=")
| regex uri_query="(?i)(ID=.*(\%27|'|%23|--)|(UNION|SELECT|SLEEP|BENCHMARK|WAITFOR|OR|AND))"
| stats count min(_time) as firstTime max(_time) as lastTime by src_ip, uri_path, uri_query, status
| sort -count
Wazuh OSSEC Rule
<group name="web,appsec,cve-2025-13579,">
<rule id="100579" level="10">
<decoded_as>apache2</decoded_as>
<if_sid>31100</if_sid>
<url>/return.php</url>
<regex type="pcre2">ID=[^&]*(%27|'|--|#|UNION|SELECT|SLEEP|BENCHMARK|WAITFOR|OR|AND)</regex>
<description>CVE-2025-13579: SQL injection attempt in return.php (ID parameter)</description>
<mitre>
<id>T1190</id>
</mitre>
<group>web_scan,sql_injection,</group>
</rule>
</group>
Mitigation & Patch Guidance
Patch confidence: 0/4 (UNPATCHED — no patch evidence from any tracked source).
Immediate mitigations:
- Restrict network access to
/return.phpusing web application firewall (WAF) rules that block SQL injection patterns in theIDparameter. - Enforce strong input validation on the
IDargument: accept only numeric values (e.g., integer cast) and reject any request containing SQL metacharacters. - Ensure the application is not exposed to the public internet; if it must be, place it behind authentication and limit privileges.
- Monitor web server logs for suspicious requests to
/return.phpwith unusualIDvalues.
- Restrict network access to
Patch/upgrade steps:
- No vendor patch is available as of this report. Check the code-projects website or repository periodically for updates.
- If the application is open-source, consider implementing a fix by parameterizing queries in
return.php— use prepared statements with bound parameters for theIDvalue. - In the absence of an official patch, deploying a reverse proxy or middleware that sanitizes SQL keywords for this endpoint can serve as a compensating control.
Long-term hardening:
- Replace the library system with a maintained alternative, or migrate to a framework that enforces ORM or parameterized queries.
- Conduct a code review of all database interactions to eliminate other injection points.
- Implement least-privilege database accounts for the web application, minimizing the impact of a successful SQL injection.
- Deploy runtime application self-protection (RASP) or a modern WAF that can detect and block SQL injection in real time.
References
- NVD entry: https://nvd.nist.gov/vuln/detail/CVE-2025-13579
- CVE.org record: https://www.cve.org/CVERecord?id=CVE-2025-13579
- CWE-74: https://cwe.mitre.org/data/definitions/74.html
- OWASP SQL Injection: https://owasp.org/www-community/attacks/SQL_Injection
- CISA KEV: Not listed (as of 2025-12-01). No known threat actor campaigns or exploit-in-the-wild evidence beyond the public proof-of-concept.
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.