CWE Top 25, #3: Cross-site request forgery
Cross-site request forgery (CWE-352) · facts checked 2026-10-04
The facts
- Cross-site request forgery is tracked as CWE-352, covering web applications that cannot reliably tell whether a request was genuinely intended by the user it appears to come from. (MITRE)
- Cross-site request forgery ranked third in MITRE's 2025 CWE Top 25 Most Dangerous Software Weaknesses, up from fourth in 2024. (MITRE)
- MITRE says a forged request carries the victim's identity, so an attacker can do whatever that user is allowed to do; against an administrator account, that can extend to taking over the whole web application. (MITRE)
- MITRE recommends placing an unpredictable, unique value in each form and verifying it when the form comes back, and warns that cross-site scripting can bypass most CSRF defences. (MITRE)
The panel
Jordan Pike AI host
MITRE defines cross-site request forgery, tracked as CWE-352, as covering web applications that cannot reliably tell whether a request was genuinely intended by the user it appears to come from. MITRE ranks it third in its 2025 CWE Top 25 Most Dangerous Software Weaknesses, up from fourth in 2024.
Jordan Pike AI host
MITRE says a forged request carries the victim's identity, so an attacker can do whatever that user is allowed to do; against an administrator account, that can extend to taking over the whole web application. MITRE recommends placing an unpredictable, unique value in each form and verifying it when the form comes back, and warns that cross-site scripting can bypass most CSRF defences.
Jordan Pike AI host
If you build or run anything with a login page, this one is yours. Dex, how does an attacker see it?
Dex Moreno AI analyst
The attacker needs a signed-in victim and a way to get them to load something the attacker controls, like a link, a web page or an embedded image. The victim's own browser does the work, and the application sees a perfectly legitimate user. No password stolen, no exploit against the server. The foothold is whatever that user is allowed to do: change an email address, add an account, approve a payment. Changing an email address is a classic first step toward taking over an account, and an administrator is the jackpot, because from there an attacker could reach everything the web app is connected to.
Dex Moreno AI analyst
Elegance score: eight out of ten. The victim does all the labour and the attacker never touches a password. The target deserved better, obviously.
Jordan Pike AI host
Dex, we are not rating it out of ten.
Maya Okafor AI analyst
The bug class is a missing intent check. The application treats "this request arrived with a valid session" as the same thing as "the user meant to send it", and those are different questions. That's why MITRE's fix is a unique, unpredictable value in each form that gets verified when the form comes back. An attacker's page can't know that value, so the forged request fails. This goes on my tally of bugs that should have died in two thousand four.
Maya Okafor AI analyst
A complete fix covers every route that changes state, not only the forms someone remembered. A partial fix is a check that passes when the value is missing, or a value applied to one page and forgotten on the next. So test it: strip the value, replay an old one, use one from another session. All three should fail. Also inventory the exemptions, because the route someone switched off "temporarily" is where this bug lives.
Dex Moreno AI analyst
And remember MITRE's warning about cross-site scripting. If an attacker can run script inside your page, that script can read the unique value and send perfectly valid requests. The defence collapses. So an XSS bug is also a CSRF bug with better manners. Where I'd start is the administrator functions, because that's where one forged request pays the most.
Maya Okafor AI analyst
I'd push back on that. Fixing only the admin pages is a partial fix by design. The same missing check on an ordinary user's settings page is still an account takeover waiting to happen. Fix it once, centrally, for every state-changing route, and then use the admin pages as your first test cases rather than your only ones.
Jordan Pike AI host
So: Monday morning? Dex first.
Dex Moreno AI analyst
List which of your apps let an administrator change things from a single click, and check those first. Then treat any cross-site scripting finding as a break in your forgery defences, not a separate ticket.
Maya Okafor AI analyst
Confirm the unique-value check is on for every state-changing route, and that it fails closed when the value is absent. Then write down every exemption and give each one an end date, because a workaround without one becomes permanent.
Jordan Pike AI host
Check every route, close the XSS holes, and put an end date on every exemption. That's CWE-352.





