How I Discovered a CSRF Vulnerability in a CV Update Feature
The CV/profile update endpoint accepted state-changing requests via GET with no CSRF token, origin check or SameSite cookie protection. An attacker could craft a malicious link or page that, when visited by a logged-in victim, silently modified the victim's CV content.
Published on medium.com
My name is Montaser Mohsen, a security researcher and bug bounty hunter passionate about discovering web vulnerabilities and helping companies secure their applications. I focus mainly on web application security, especially logic flaws and access control issues.
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 server accepted state-changing profile updates over GET and had no CSRF token, origin/referrer validation or SameSite cookie protection.
Impact
An attacker could modify a logged-in victim's CV/profile data, causing defacement and possible reputational damage, and the text suggests it could be combined with other issues for more serious account abuse.
What the attacker needed
Victim is logged in; victim visits attacker page or link; no CSRF token or origin check
The fix
The issue was fixed; the recommended mitigations are POST-only state changes, CSRF tokens, Origin/Referer validation and SameSite cookies.
How it was found
- Observe that the profile update is normally sent as a POST request.
- Replay the same request and note that it triggers logout behaviour.
- Change the request method from POST to GET and see the update succeed.
- Craft a malicious HTML page or link that issues the GET request to the update endpoint.
- Have a logged-in victim visit the page so their CV content is modified.
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 in to a site, your browser automatically sends your session cookie with every request to that site. If a site lets a simple link change your data, another website can trick your browser into sending that link while you are logged in, and the change happens without you noticing. This is called cross-site request forgery (CSRF).
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.