☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.9 🐛 CWE-74
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-12326

CVE-2025-12326 SQL Injection in Shawon100
📅 PUBLISHED: 2025-10-27 21:02 UTC 🔄 UPDATED: 2026-08-18 17:13 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.42%
👁️
0.42% probability
10.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
6.9
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-12326 is a critical SQL injection vulnerability discovered in the shawon100 RUET Online Judge (OJ) application, up to commit 18fa45b0a669fa1098a0b8fc629cf6856369d9a5. The flaw resides in the /process.php file, specifically within the POST request handler, where the un argument is directly concatenated into SQL queries without sanitization or parameterization. This allows an unauthenticated remote attacker to inject arbitrary SQL commands, potentially leading to data exfiltration, authentication bypass, or full database compromise.

The vendor (shawon100) was contacted but did not respond, and no official patch or versioning system exists for this product. The exploit has been publicly disclosed, increasing the risk of active exploitation. Despite a low EPSS score (0.0%), the public availability of exploit code and the lack of a patch make this a high-priority threat for any organization using this software.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not associated with any package manager (NPM, PyPI, Go, Ruby). It is a standalone web application (RUET Online Judge) hosted on a web server. The risk is limited to direct deployments of this application.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L
  • Base Score: 7.3 (High)
  • Attack Vector: Network (AV:N) – Exploitable remotely.
  • Attack Complexity: Low (AC:L) – No special conditions required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action required.
  • Scope: Unchanged (S:U) – Vulnerability cannot affect other components.
  • Confidentiality Impact: High (C:H) – Full database read access possible.
  • Integrity Impact: Low (I:L) – Limited data modification possible.
  • Availability Impact: Low (A:L) – Potential for denial of service via SQL injection.

Threat Level: High. The combination of remote exploitability, no authentication, public exploit code, and no available patch makes this a critical risk for affected systems.

Deep Dive & Mechanics

The vulnerability is a classic SQL injection in the /process.php endpoint. The application likely constructs a SQL query by directly concatenating the un POST parameter without any sanitization or prepared statements. For example, the vulnerable code might resemble:

$username = $_POST['un'];
$query = "SELECT * FROM users WHERE username = '$username'";
$result = mysqli_query($conn, $query);

An attacker can inject SQL by providing a value like ' OR '1'='1 to bypass authentication or ' UNION SELECT ... to extract data from other tables. The lack of input validation and the use of string concatenation instead of parameterized queries are the root causes.

The application does not use versioning, so all deployments up to the identified commit are vulnerable. The vendor's unresponsiveness means no official fix exists.

Vulnerable vs. Patched Code

Since no patch is available, we can only describe the vulnerable code pattern and the recommended fix.

Vulnerable Code (PHP):

<?php
$username = $_POST['un'];
$query = "SELECT * FROM users WHERE username = '$username'";
$result = mysqli_query($conn, $query);
?>

Patched Code (Recommended):

<?php
$username = $_POST['un'];
$stmt = $conn->prepare("SELECT * FROM users WHERE username = ?");
$stmt->bind_param("s", $username);
$stmt->execute();
$result = $stmt->get_result();
?>

The fix uses prepared statements with parameterized queries, which prevents SQL injection by separating SQL logic from user input.

Exploitation & Lab Setup

Red Team (Exploitation)

The exploit is publicly available. Below is a simple proof-of-concept using curl to test for SQL injection.

Exploit Command:

curl -X POST http://target.com/process.php -d "un=' OR '1'='1"

If the application returns data or a different response than expected, it is vulnerable. For data extraction, use a UNION-based injection:

curl -X POST http://target.com/process.php -d "un=' UNION SELECT 1,2,3,4,5-- -"

Lab Setup:

  1. Deploy a local instance of RUET OJ using the vulnerable commit.
  2. Use a tool like sqlmap for automated exploitation:
    sqlmap -u "http://localhost/process.php" --data="un=test" --batch --dbs
    
  3. Alternatively, use a manual approach with Burp Suite to intercept and modify the POST request.

Blue Team (Detection & Defense)

Detection:

  • Monitor web server logs for suspicious POST requests to /process.php containing SQL keywords (OR, UNION, SELECT, --, ').
  • Use a Web Application Firewall (WAF) to block requests with SQL injection patterns.

Defense:

  • Immediately isolate any systems running this software.
  • Apply virtual patching via WAF rules.
  • If possible, rewrite the vulnerable code using prepared statements (see patched code above).
  • Restrict network access to the application to trusted IPs only.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • POST requests to /process.php with un parameter containing SQL injection patterns (e.g., ' OR, UNION SELECT, --).
    • Unusual database error messages in HTTP responses (e.g., "You have an error in your SQL syntax").
  • File IOCs:
    • Modified or new files in the web root (e.g., webshells uploaded via INTO OUTFILE).
  • Log IOCs:
    • Web server logs showing repeated requests to /process.php with varying un values.
    • Database logs showing unexpected queries or errors.

Detection Engineering

YARA Rule

rule CVE_2025_12326_SQLi_ProcessPHP {
    meta:
        description = "Detects SQL injection attempts targeting /process.php in RUET OJ"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-12326"
    strings:
        $s1 = "/process.php" ascii nocase
        $s2 = "un=" ascii nocase
        $sqli1 = /un=.*('|%27).*(OR|or|UNION|union|SELECT|select)/ ascii nocase
        $sqli2 = /un=.*(--|%23|#)/ ascii nocase
    condition:
        $s1 and $s2 and ($sqli1 or $sqli2)
}

Sigma Rule

title: SQL Injection Attempt Against RUET OJ /process.php
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL injection attempts targeting the /process.php endpoint of RUET OJ
author: Valters IT
date: 2025-04-10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-12326
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/process.php'
        cs-uri-query|contains: 'un='
    keywords:
        - ' OR '
        - ' UNION '
        - ' SELECT '
        - '--'
        - '#'
    condition: selection and keywords
falsepositives:
    - Legitimate use of special characters in usernames (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-12326 SQL Injection Attempt on /process.php"; flow:to_server,established; content:"POST"; http_method; content:"/process.php"; http_uri; content:"un="; http_client_body; pcre:"/un=.*('|%27).*(OR|or|UNION|union|SELECT|select)/Pi"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate the affected system from the network if possible.
  2. Apply virtual patching using a WAF to block SQL injection patterns targeting /process.php.
  3. Restrict access to the application to trusted IP addresses only.

Long-Term Fix:

  • Since the vendor is unresponsive, the only permanent fix is to rewrite the vulnerable code using prepared statements (see patched code example above).
  • If you are the maintainer, fork the repository and apply the fix.
  • Consider migrating to a different, actively maintained online judge platform.

Detection:

  • Deploy the provided YARA, Sigma, and Suricata rules to detect exploitation attempts.
  • Monitor logs for any signs of successful exploitation (e.g., unexpected database output, new files).

Valters IT – Securing your digital frontier.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-12326/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.