CVE-2025-13346

6.3 MEDIUM

📋 TL;DR

This SQL injection vulnerability in SourceCodester Train Station Ticketing System 1.0 allows attackers to manipulate database queries via the /ajax.php?action=save_station endpoint. Remote attackers can potentially read, modify, or delete database contents. All users running the vulnerable version are affected.

💻 Affected Systems

Products:
  • SourceCodester Train Station Ticketing System
Versions: 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the /ajax.php?action=save_station endpoint with id/station parameter manipulation

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, system takeover, or destruction of ticketing data

🟠

Likely Case

Unauthorized data access and potential privilege escalation within the application

🟢

If Mitigated

Limited impact with proper input validation and database permissions in place

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Public exploit available on GitHub, remote exploitation possible

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://www.sourcecodester.com/

Restart Required: No

Instructions:

No official patch available. Consider implementing input validation and parameterized queries in the source code.

🔧 Temporary Workarounds

Web Application Firewall (WAF) Rules

all

Implement WAF rules to block SQL injection patterns targeting /ajax.php with save_station action

Input Validation Filter

all

Add server-side validation for id and station parameters to allow only expected data types

🧯 If You Can't Patch

  • Isolate the system from internet access and restrict to internal network only
  • Implement strict database user permissions with least privilege principle

🔍 How to Verify

Check if Vulnerable:

Test the /ajax.php?action=save_station endpoint with SQL injection payloads in id or station parameters

Check Version:

Check application version in admin panel or source code files

Verify Fix Applied:

Verify that SQL injection payloads no longer execute and return error messages

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple requests to /ajax.php?action=save_station with suspicious parameters

Network Indicators:

  • HTTP POST/GET requests to /ajax.php containing SQL keywords in parameters

SIEM Query:

source="web_logs" AND uri_path="/ajax.php" AND (param_name="id" OR param_name="station") AND (param_value CONTAINS "UNION" OR param_value CONTAINS "SELECT" OR param_value CONTAINS "OR 1=1")

🔗 References

📤 Share & Export