SQL injection in URL path processing on www.ibm.com
A blind SQL injection existed in URL path processing on www.ibm.com, allowing an attacker to influence SQL queries through a single quote placed after the leading slash. Although query results were not reflected, the server's response differed between a successful and failed query, enabling boolean-based data exfiltration.
- Triaged in 14 hours
- Fixed in 23 days
- Disclosed after 36 days
Summary by the program
A blind SQL injection in URL path processing on www.ibm.com was reported to IBM, analyzed and has been remediated. Thank you to @asterite.
Summary by the researcher
Blind SQL injection was present in URL path processing on www.ibm.com. An interesting thing is that the vulnerability was present in, essentially, any path, one could put a single quote right after the leading slash in path to start exploiting it.
SQL query result was not reflected in server response and server response after exploitation attempt was always erroneous, but it differed depending on whether SQL query failed or not. If SQL query (influenced by our injection attack vector) did not fail, server responded with an endless redirect. If SQL query failed, server responded with status 500. So, it was possible to distinguish those two cases and use boolean error-based exfiltration technique.
Another complication was that spaces and line breaks (\n) could not be used in injected payload, but it was possible to overcome this and exploit the vulnerability without them.
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 concatenated the URL path directly into a SQL query without proper parameterisation or sanitisation.
Impact
An attacker could extract data from the database through boolean-based blind SQL injection, though the report does not specify what data was accessible.
What the attacker needed
None
The fix
The vulnerability was remediated by IBM.
How it was found
- Place a single quote right after the leading slash in the URL path.
- Observe the server response: an endless redirect means the SQL query did not fail, while a 500 status means it failed.
- Use this difference to perform boolean error-based exfiltration, working around the restriction on spaces and line breaks.
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.
A blind SQL injection is a flaw where user input is inserted into a database query, but the attacker cannot see the query results directly. Here, the attacker could tell whether their injected condition was true or false by observing whether the server returned an endless redirect or a 500 error, which let them extract data one bit at a time.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.