How I stumbled upon a stored XSS : my first bug bounty story
A teacher could add a student whose first or last name contained an XSS payload, and the payload executed when the student was deleted. An attacker could run script in the context of the application when a teacher deleted the malicious student.
Published on medium.com
I found this bug a few months back.I am grateful to the community as I have learned every damn thing from the community.I found this bug in Edmodo as who doesn’t want a swag for showing off in front of friends :).So Lets start the story.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application stored the student's name without sanitising it and later rendered it unsafely in the delete confirmation or list, allowing script execution.
Impact
An attacker could execute script in the context of the application when a teacher deleted the malicious student, potentially affecting the teacher's session.
What the attacker needed
Teacher account to create group and add student; ability to add a student with a crafted name; teacher deletes the student
How it was found
- Create a group as a teacher.
- Add a student with an XSS payload in the first name and last name.
- Delete the student created with the XSS payload.
- Observe the alert payload executing.
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 write-up has not been written yet. The Original tab links to the source.
Cross-site scripting (XSS) is when a website shows user input without cleaning it, so a browser runs it as code. Here, a name saved when adding a student was not cleaned, and the script ran when that student was deleted. This let the author show an alert box, proving script could run.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.