System Error Reveals SQL Information
Two web endpoints returned verbose SQL error messages that included database error codes and fragments of the underlying SQL queries. An attacker could use this information to learn about the database system and craft further attacks.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 49 days
- Disclosed after 50 days
Hello,
While testing your program i came across an endpoint that is leaking sql errors and queries from on of your websites.
I use the following google dork to detect this:
site:████████ "sql error"
Endpoints leaking data: https://www.██████/██████████ https://www.███████/███
Some of the errors found on https://www.███/█████: SQLSTATE █████████ DATASOURCE ███ VENDORERRORCODE ███ SQL SELECT █████████, █████', '█████████, ██████, ████, ███████, ███████, ████████ (..) ██████████-████████: ██████" ████" ███ ████ ██████████ ████ █████ (..)
Some of the errors found on https://www.███████/████: SQLSTATE █████████ DATASOURCE █████ VENDORERRORCODE ███ SQL SELECT ██████████ ███████ ███████, ██████, ██████, █████, █████, ████████ (...) █████████-███: ███████" █████" ██████ ███████ ████ █████ ██████████ (...)
Best Regards Miguel Santareno
Impact
Attacker can use the error messages to gain further knowledge of the SQL system to launch future attacks.
System Host(s)
www.███████
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
Open the following endpoints https://www.██████████/█████ and https://www.█████████/███████ and you should be able to see the information above mentioned.
Suggested Mitigation/Remediation Actions
Remove any mention of the SQL database calls in the stack trace error.
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 displays raw database error details to users instead of a generic error page.
Impact
An attacker could use the leaked SQL error details to gain knowledge of the database system and potentially launch further attacks.
What the attacker needed
None
How it was found
- Open the first listed endpoint.
- Open the second listed endpoint.
- Observe the SQL error details shown on the pages.
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.
When a website has a bug in how it talks to its database, it can show an error message. Here those messages were too detailed and revealed parts of the database queries and error codes. That helps an attacker understand the database and plan a more serious attack.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.