Skip to content
CSRF Write-up Beginner

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.

MostReal Follow

Published on medium.com

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!

MostReal, on medium.com

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

  1. Find the public identity submission endpoint.
  2. Notice the form includes a CSRF token.
  3. Observe that the server accepts requests even when the token is not properly checked.
  4. 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.

More by MostReal

View all

9 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.