[critical] sql injection by GET method
The report claims an SQL injection in a GET parameter on a Khan Academy translations endpoint, where a single quote caused a 500 error and a forged boolean condition returned all CSV files instead of only English ones. The attacker could potentially read data from the database.
Originally disclosed on HackerOne
- Triaged in 1 hour
- Fixed in 4 days
- Disclosed after 11 days
Hey there, after tampering a bit with the values, since I figured out your backend is not php (most likely django or nodejs), I found an SQL injection . You can view my steps to reproduce, if you need additional screenshots, please let me know. Regards Gabriel Kimiaie
Impact
If I dig deeper, I may be able to read datas from your database, hopefully I won't do it.
The hacker selected the SQL Injection weakness. This vulnerability type requires contextual information from the hacker. They provided the following answers:
Verified Yes
What exploitation technique did you utilize? Boolean
Please describe the results of your verification attempt. After submitting a single quote, I got the 500 error. after few steps, I got rid of the 500 error by forging a valid sql query which is as follows: https://www.khanacademy.org/translations/videos/en'%20or'1'=='1_youtube_stats.csv it returns to me all csv since 1 is equal to one when changing the boolean condition: https://www.khanacademy.org/translations/videos/en'%20AND'1'=='0_youtube_stats.csv (and '1'=='0): only the english csvs are shown.
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 user input directly into an SQL query without parameterisation or proper escaping.
Impact
The attacker could potentially read data from the database, though the report only demonstrates boolean-based differences in returned CSV files.
What the attacker needed
None
How it was found
- Send a request with a single quote in the parameter and observe a 500 error.
- Craft a boolean condition that evaluates to true and observe all CSV files returned.
- Change the condition to false and observe only English CSV files returned.
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 when user input is inserted into a database query without proper handling, letting an attacker change the query's meaning. Here, adding a quote character broke the query and caused an error, and then a crafted condition made the server return more files than intended. This could let someone read data they should not see.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.