CSRF Attack di sahabat.kotabogor.go.id — Change Bio profil
The server accepted a form submission with a CSRF token without actually verifying that token, so any logged-in user's session could be used to submit forged identity data. An attacker could make a victim's browser post fake personal details to the public endpoint without the victim's consent.
Halo, aku Arya (alias Arya), dan kali ini aku mau sharing cerita soal temuan bug CSRF (Cross-Site Request Forgery) yang berhasil aku temukan di situs resmi pemerintah daerah, yaitu sahabat.kotabogor.go.id. Yuk, kita bahas santai tapi detail!
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 server issued a CSRF token but did not validate it on the public identity submission endpoint, relying only on the session cookie.
Impact
An attacker could submit fake identity data using another user's session, potentially causing spam or manipulation of public records; the text does not show a working exploit against a real victim.
What the attacker needed
Victim is logged in; victim visits attacker page
The fix
The server should strictly validate the CSRF token and also check the Origin or Referer header, and use SameSite cookies.
How it was found
- Find the public identity submission endpoint.
- Notice the form includes a CSRF token.
- Observe that the server accepts requests even when the token is not properly checked.
- Build a page that auto-submits a form to the endpoint using the victim's session.
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.
A CSRF attack tricks a logged-in user's browser into sending a request the user did not intend. Here the site included a security token in the form, but the server never checked it, so a malicious page could submit the form using the victim's existing login cookie.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.