How I Found a CSRF Vulnerability That Could Take Over Student Accounts on an Educational Platform
The student profile update endpoint on a university Odoo site accepted POST requests without a CSRF token, relying only on the session cookie. An attacker could make a logged-in victim's browser submit a forged form that changed the victim's email address, then use the password reset flow to take over the account.
I was browsing on information management site of my university the other day, redacted.odoo.com, and I did come across something interesting. It began as an simple recon but turned into a chain of account takeover, all based on one of the lesserknown and frequently ignored vulnerabilities, Cross-Site Request Forgery…
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
The profile update endpoint lacked a CSRF token and Origin/Referer validation, and the session cookie was not set to SameSite=Strict, so a cross-site POST was accepted as legitimate.
Impact
An attacker could change a logged-in student's profile email and then complete a full account takeover via password reset; the author claims this could affect all students and teachers, though no mass exploitation is demonstrated.
What the attacker needed
Victim has an account and is logged in; victim clicks an attacker link; attacker can host a malicious page
The fix
The endpoint should require a per-session CSRF token, set SameSite=Strict on session cookies, validate Origin and Referer headers, and require the current password before changing email or contact details.
How it was found
- The victim logs into the university site and has a valid session.
- The victim is tricked into opening an attacker-controlled page via social engineering.
- The rogue page automatically submits a forged multipart form to the profile update endpoint with attacker-chosen values, including a new email address.
- The server accepts the request because the session cookie is valid and no CSRF token is checked.
- The attacker triggers the forgot-password flow, receives the reset link at the new email, and sets a new password.
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.
When you log into a website, your browser stores a cookie that proves who you are, and it sends that cookie with every request to that site. Cross-Site Request Forgery (CSRF) tricks your browser into sending a request to a site you are logged into, from a page the attacker controls, so the site thinks you made the request yourself. Here the profile update form had no extra secret check, so a malicious page could quietly change the victim's email address and then the attacker used the password reset to take over the account.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.