Cross-Site Request Forgery (CSRF)
A route through the library rather than a dump of it. Items are drawn from the full CSRF collection, filtered to teaching material (news items are excluded) and ordered within each stage by depth signals — whether the piece carries code, how substantial it is, and what readers actually open.
1
Start here
5 resourcesOrientation and first principles — what the bug class is and how it behaves.
- The Bug Bounty Guide to Exploiting CSRF Vulnerabilities - YesWeHackGuide to exploiting Cross-Site Request Forgery (CSRF) vulnerabilities, detailing POST-based, GET-based, and stored CSRF attacks. It explains how attackers leverage a user's authenticated session to trick their browser into executing unauthorized actions, such as changing account settings or transferring funds. The guide illustrates real-world scenarios and payloads, including HTML forms for POST requests and image tags for GET requests, to demonstrate the mechanisms and impact of these vulnerabilities, emphasizing the exploitation of trust between browser and site without proper anti-CSRF protections.
- Web Application Security: Anti-CSRF & Cookie SameSite OptionsGuide to implementing anti-CSRF tokens and Cookie SameSite options, detailing how CSRF attacks leverage GET and POST requests and exploit HTML forms with JavaScript. It explains the mechanics of hidden input fields and form submission, then introduces secret, randomly generated tokens as a primary defense, to be verified by the server upon form submission.
- Cross-site request forgery - WikipediaLibrary detailing Cross-Site Request Forgery (CSRF) attacks, also known as one-click attacks. It explains how attackers exploit trust in a user's browser to submit unauthorized commands, impacting sites like Netflix, ING Direct, YouTube, and McAfee. The entry highlights the use of specially crafted image tags, hidden forms, JavaScript, and CVE-2008-6586 in μTorrent, emphasizing how cookies and GET requests facilitate these exploits.
- CSRF - OWASP FoundationReference to Cross-Site Request Forgery (CSRF), an attack forcing authenticated users to execute unwanted actions. It details how attackers can trick victims via social engineering to perform state-changing requests, potentially compromising entire web applications or stealing private data through methods like login CSRF. The document highlights flawed prevention techniques and illustrates attack scenarios, including GET and POST request exploits, and mentions frameworks with built-in CSRF support and tools like OWASP CSRF Guard.
- What is CSRF? Attacks, Mitigation, Prevention - AcunetixReference on Cross-Site Request Forgery (CSRF), detailing its mechanism of tricking authenticated users into performing unintended actions, often via social engineering or malicious links. It highlights how CSRF leverages session cookies to bypass authentication, affecting state changes in web applications. The entry explains CSRF execution through both GET and POST requests, providing examples using HTML tags and JavaScript. It also touches upon prevention mechanisms like referer headers and custom X-Requested-With headers.
2
Build depth
5 resourcesReal testing methodology, tooling, and writeups that show the work.
- YesWiki admin despam CSRF deletes wiki pagesWriteup on YesWiki's despam action CSRF vulnerability, GHSA-cv88-hx5q-vq72, details how an unauthenticated attacker can delete arbitrary wiki pages, including critical configuration pages like `PagePrincipale` and `GererConfig`, or restore old revisions. This is achieved by exploiting the lack of CSRF tokens in the `despam` action, combined with default settings that allow raw HTML and open write ACLs. An attacker crafts a wiki page containing an auto-submitting form; when an administrator views this page, their session cookie is sent with the POST request, allowing the attacker to perform destructive actions attributed to the administrator.
- One Link to Unlink: CSRF in OpenAI Discord Verification ServiceLibrary for detecting Cross-Site Request Forgery (CSRF) vulnerabilities, specifically detailing a P3-severity finding in OpenAI's Discord verification service. The vulnerability allowed an attacker to unlink a user's OpenAI account from their Discord account via a crafted GET request to the `/unlink` endpoint, which lacked proper anti-CSRF token protection and used a state-changing HTTP GET method. This could lead to unintended account unlinking and disruption of community access for affected users.
- Bypassing Referer-Based CSRF with strict-origin-when-cross-originTechnique bypassing Referer-based CSRF attacks by exploiting the `strict-origin-when-cross-origin` referrer policy. This policy, default in major browsers, sets the Referer header to the origin of the document initiating a request, even if the top-level page is different. This allows an attacker to host a `text/css` or JavaScript module file on the target domain, which then makes a request back to a vulnerable endpoint. When this file is linked from the attacker's own page, the browser sends the target's origin as the Referer, satisfying the check. The attack is further enhanced if the uploaded file can be linked from a same-origin subdomain, allowing it to carry session cookies.
- How to protect Node.js apps from CSRF attacksLibrary for protecting Node.js applications from CSRF attacks, detailing how these vulnerabilities exploit authenticated user sessions. It explains the mechanics of CSRF, the impact of successful attacks including data manipulation and account takeover, and practical protection strategies. Key techniques covered include the Synchronizer Token Pattern (STP), implementing SameSite cookies (strict and lax), and the Double Submit Cookie pattern.
- CSRF in the Age of JSONWriteup on CSRF in the age of JSON, detailing how Cross-Site Request Forgery attacks persist against applications using JSON for data transfer. It covers challenges introduced by the `application/json` MIME type and Same-Origin Policy, exploring exploitation techniques such as manipulating content types to `text/plain` and leveraging weak CORS policies with `Access-Control-Allow-Origin` and `Access-Control-Allow-Credentials` headers. The writeup assumes an authorization model based on cookies and predictable request schemas, providing concrete examples of vulnerable requests and proof-of-concept exploits.
3
Go deep
6 resourcesNovel research, edge cases, and the techniques that push the class forward.
- CSRF: Advanced Exploitation Guide - IntigritiGuide to advanced CSRF exploitation techniques, detailing how to identify and exploit vulnerabilities by understanding conditions like the `SameSite` cookie policy and the absence of unpredictable tokens. It covers bypassing Content-Type and method-based restrictions, as well as exploiting weaknesses in anti-CSRF token validation and Referer header checks.
- Advanced CSRF: How to Bypass SameSite Cookie ProtectionsLibrary detailing bypass techniques for SameSite cookie protections, which default to Lax in Chrome. It explains the distinction between Site and Origin, the three SameSite restriction levels (Strict, Lax, None), and demonstrates how misconfigured servers can be exploited. The article outlines methods to bypass Lax restrictions using GET requests, even when POST is expected, and circumvent Strict protections through third-party redirect gadgets, particularly client-side JavaScript.
- Chaining Stored XSS and CSRF in Typemill CMS: A Deep Dive into Attribute InjectionA security assessment of Typemill CMS revealed a high-severity vulnerability chain (CVE-2026–53468) combining Stored XSS and CSRF. The flaw allows attackers to bypass frontend validation and inject malicious scripts into page metadata, ultimately enabling admin session hijacking. This exploit targets Typemill, a PHP and Slim framework-based flat-file CMS.
- Advanced Techniques to Bypass CSRF DefensesAdvanced Techniques to Bypass CSRF Defenses
- Eight Doors, One Key: Chaining Misconfigurations into Full Account TakeoverA security researcher demonstrated a novel account takeover vulnerability by chaining multiple misconfigurations within an application. Despite robust security measures like CSRF tokens, SameSite cookies, strict CORS, and a Web Application Firewall (WAF), a single HTML injection flaw proved sufficient. This exploit bypassed standard defenses, ultimately leading to full account takeover, highlighting the importance of considering how individual vulnerabilities can be combined to achieve a severe impact.
- SAP Web Dispatcher / ICM request forgery (critical)Advisory for SAP Web Dispatcher and SAP NetWeaver Application Server ABAP (ICM) request forgery, a critical vulnerability. Unauthenticated attackers can exploit insufficient request validation in administrative functions to trick logged-on administrators into visiting malicious links. This can trigger unintended actions within the administrator's session, potentially leading to a full operating system compromise and severe impacts on confidentiality, integrity, and availability.