Client Side string length check
The class rename feature only checked the name length in the browser, not on the server, so an attacker could save a name of over 108,000 characters instead of the expected 50. This could break page templates, crash pages for low-memory visitors, and cause unexpected behaviour.
- Triaged in 3 days
- Fixed in 31 days
- Disclosed after 2.3 years
Hi, in the "Class Settings" page on khanacademy.org you can rename the class, but the string length check is not done on the server side. Throughout the experimentation I used an account with associated email "██████████" and where applicable, class ID ████. An attacker can save thousands of characters instead of the expected 50 (while I was testing I was able to set a string of over 108 thousand characters!). The fix may be limited to the server-side string length check, however I recommend checking the string length on all other pages as well.
Request URL: https://it.khanacademy.org/api/internal/graphql/renameStudentListMutation Parameter (POST): "name"
Impact
An attacker could exploit this lack of control to save content, break the page template (for /profile/attackerusername too), crash the page for low-memory visitors, and possibly cause unexpected behavior.
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
Impact
An attacker could save oversized content, break the page template including the profile page, crash the page for low-memory visitors, and possibly cause unexpected behaviour.
What the attacker needed
An account; ability to send a direct API request
The fix
The server should enforce the same string length limit as the client, and the reporter recommends checking length on all other pages as well.
How it was found
- Open the Class Settings page on khanacademy.org.
- Rename the class and observe the client-side length limit.
- Send a rename request directly to the GraphQL mutation with a much longer name value.
- The server saves the oversized name.
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.
The browser limited long names, but a direct request could store a huge name, which could break pages that displayed it.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.