Your business’ toughest competition might be criminal. See why.
Utility navigation bar redirect icon
Portal LoginSupportContact
Search
Close search
Huntress Logo in Teal
  • Platform Overview
    Managed EDR

    Get full endpoint visibility, detection, and response

    Managed EDR

    Get full endpoint visibility, detection, and response

    Managed ITDR

    Protect your Microsoft 365 identities and email environments.

    Managed ITDR

    Protect your Microsoft 365 identities and email environments.

    Managed SIEM

    Managed threat response and robust compliance support at a predictable price.

    Managed SIEM

    Managed threat response and robust compliance support at a predictable price.

    Managed Security Awareness Training

    Empower your teams with science-backed security awareness training.

    Managed Security Awareness Training

    Empower your teams with science-backed security awareness training.

    Integrations
    Integrations
    Support Documentation
    Support Documentation
    See Huntress in Action

    Quickly deploy and manage real-time protection for endpoints, email, and employees - all from a single dashboard.

    Huntress Cybersecurity
    See Huntress in Action

    Quickly deploy and manage real-time protection for endpoints, email, and employees - all from a single dashboard.

    Huntress Cybersecurity
  • Threats We Stop
    Phishing
    Phishing
    Business Email Compromise
    Business Email Compromise
    Ransomware
    Ransomware
    View Allright arrowView Allright arrow
    Industries We Serve
    Education
    Education
    Financial Services
    Financial Services
    State and Local Government
    State and Local Government
    Healthcare
    Healthcare
    Law Firms
    Law Firms
    Manufacturing
    Manufacturing
    Utilities
    Utilities
    View Allright arrowView Allright arrow
    Tailored Solutions
    MSPs
    MSPs
    Resellers
    Resellers
    SMBs
    SMBs
    Compliance
    Compliance
    Cybercriminals Have Evolved

    Get the intel on today’s cybercriminal groups and learn how to protect yourself.

    Huntress Cybersecurity
    Cybercriminals Have Evolved

    Get the intel on today’s cybercriminal groups and learn how to protect yourself.

    Huntress Cybersecurity
  • Pricing
  • Community Series
    The Product Lab

    Shape the next big thing in cybersecurity together.

    The Product Lab

    Shape the next big thing in cybersecurity together.

    Fireside Chat

    Real people. Real perspectives. Better conversations.

    Fireside Chat

    Real people. Real perspectives. Better conversations.

    Tradecraft Tuesday

    No products, no pitches – just tradecraft.

    Tradecraft Tuesday

    No products, no pitches – just tradecraft.

    _declassified

    Exposing hidden truths in the world of cybersecurity.

    _declassified

    Exposing hidden truths in the world of cybersecurity.

    Resources
    Upcoming Events
    Upcoming Events
    ebooks
    ebooks
    On-Demand Webinars
    On-Demand Webinars
    Videos
    Videos
    Whitepapers
    Whitepapers
    Datasheets
    Datasheets
    Cybersecurity Education
    Cybersecurity 101
    Cybersecurity 101
    Cybersecurity Guides
    Cybersecurity Guides
    Threat Library
    Threat Library
    Real Tradecraft, Real Results
    Real Tradecraft, Real Results
    2026 Cyber Threat Report
    2026 Cyber Threat Report
    The Huntress Blog
    Huntress Lands on the Microsoft Marketplace
    Huntress Cybersecurity
    Huntress Lands on the Microsoft Marketplace
    Huntress Cybersecurity
    How Huntress & DEFCERT Are Streamlining CMMC Assessment Prep
    Huntress Cybersecurity
    How Huntress & DEFCERT Are Streamlining CMMC Assessment Prep
    Huntress Cybersecurity
    Live Hacking Into Microsoft 365 with Kyle Hanslovan
    Huntress Cybersecurity
    Live Hacking Into Microsoft 365 with Kyle Hanslovan
    Huntress Cybersecurity
  • Why Huntress

    Go beyond AI in the fight against today’s hackers with Huntress Managed EDR purpose-built for your needs

    Huntress Cybersecurity
    Why Huntress

    Go beyond AI in the fight against today’s hackers with Huntress Managed EDR purpose-built for your needs

    Huntress Cybersecurity
    The Huntress SOC

    24/7 Security Operations Center

    The Huntress SOC

    24/7 Security Operations Center

    Reviews

    Why businesses of all sizes trust Huntress to defend their assets

    Reviews

    Why businesses of all sizes trust Huntress to defend their assets

    Case Studies

    Learn directly from our partners how Huntress has helped them

    Case Studies

    Learn directly from our partners how Huntress has helped them

    Community

    Get in touch with the Huntress Community team

    Community

    Get in touch with the Huntress Community team

    Compare Huntress
    Bitdefender
    Bitdefender
    Blackpoint
    Blackpoint
    Breach Secure Now!
    Breach Secure Now!
    Crowdstrike
    Crowdstrike
    Datto
    Datto
    SentinelOne
    SentinelOne
    Sophos
    Sophos
    Compare Allright arrowCompare Allright arrow
  • HUNTRESS HUB

    Login to access top-notch marketing resources, tools, and training.

    Huntress Cybersecurity
    HUNTRESS HUB

    Login to access top-notch marketing resources, tools, and training.

    Huntress Cybersecurity
    Partners
    MSPs

    Join our partner community to deliver expert-led managed security.

    MSPs

    Join our partner community to deliver expert-led managed security.

    Resellers

    Partner program designed to grow your cybersecurity business.

    Resellers

    Partner program designed to grow your cybersecurity business.

    Tech Alliances

    Driving innovation through global technology Partnerships

    Tech Alliances

    Driving innovation through global technology Partnerships

    Microsoft Partnership

    A Level-Up for Your Business Security

    Microsoft Partnership

    A Level-Up for Your Business Security

  • Press Release
    Huntress Announces Collaboration with Microsoft to Strengthen Cybersecurity for Businesses of All Sizes
    Huntress Cybersecurity
    Press Release
    Huntress Announces Collaboration with Microsoft to Strengthen Cybersecurity for Businesses of All Sizes
    Huntress Cybersecurity
    Our Story

    We're on a mission to shatter the barriers to enterprise-level security.

    Our Story

    We're on a mission to shatter the barriers to enterprise-level security.

    Newsroom

    Explore press releases, news articles, media interviews and more.

    Newsroom

    Explore press releases, news articles, media interviews and more.

    Meet the Team

    Founded by former NSA Cyber Operators. Backed by security researchers.

    Meet the Team

    Founded by former NSA Cyber Operators. Backed by security researchers.

    Careers

    Ready to shake up the cybersecurity world? Join the hunt.

    Careers

    Ready to shake up the cybersecurity world? Join the hunt.

    Awards
    Awards
    Contact Us
    Contact Us
  • Portal Login
  • Support
  • Contact
  • Search
  • Get a Demo
  • Start for Free
Portal LoginSupportContact
Search
Close search
Get a Demo
Start for Free
HomeCybersecurity 101
Cross-Site Request Forgery

What Is Cross-Site Request Forgery (CSRF)?

Published:

Written by: Lizzie Danielson

Glitch effectGlitch effect

Cross-Site Request Forgery (CSRF) is an attack that tricks a user into performing an unwanted action on a web application where they are currently authenticated. This type of attack exploits the trust a web application has in an authenticated user.

TL;DR: A CSRF attack forces a logged-in user to unknowingly submit a malicious request to a website, like changing their email address or transferring funds without their consent. Think of it as a threat actor hijacking your authenticated session to do things on your behalf.

What is Cross-Site Request Forgery (CSRF)?

Cross-Site Request Forgery, often called CSRF (pronounced "sea-surf") or XSRF, is one of the more sneaky cybersecurity threats out there. It’s an attack that forces an end user to execute unwanted actions on a web application in which they’re currently logged in. The whole point of a CSRF attack is to exploit the trust that a web application has in a user.

So, how does this actually work? Let's break it down.

Imagine you're logged into your online banking website. Without logging out, you open a new tab and visit another website—maybe one sent to you in a phishing email or a shady forum. This other site could have hidden code that automatically sends a request back to your banking site. Since you're still authenticated with your bank, the bank's server sees this request as legitimate and processes it. Bam! You might have just unknowingly transferred money or changed your account details.

How does a CSRF attack work?

For a CSRF attack to be successful, a few things need to line up:

  • Relevant action: The attacker needs a target action that they can trigger. This could be anything from changing a password, making a purchase, or sending a message. The more privileged the user, the more damage can be done.

  • Cookie-based session handling: The application must rely solely on session cookies to identify the user who is making the requests. The browser automatically includes these cookies with every request to the site.

  • No unpredictable parameters: The malicious request shouldn't require any parameters that the attacker can't determine or guess. If the request needs a secret token, for example, the attack will likely fail.

A common delivery method for a CSRF attack is through a malicious link or a specially crafted HTML image tag. For example, an attacker could embed an image tag in an email that points to a URL that performs an action, like:

When your browser tries to load this "image," it actually sends a request to your bank to transfer $1,000. Because you're already logged in, the bank processes it. Ouch.

Real-world example

Our team examined a vulnerability in ConnectWise Control, originally reported by Bishop Fox (assigned CVE-2019-16513). In this case, the application lacked CSRF protection, meaning that if an authenticated user visited a malicious third-party website, a hidden script could send unauthorized API requests—such as disabling security alerts—without the user's knowledge or consent.

Once validated that after patches were applied and CORS policies tightened, the specific CSRF proof-of-concept no longer functioned. However, the broader lesson remains: even when other defenses are in place, the absence of CSRF tokens can still open the door to stealthy, unauthorized actions on a user's behalf—underscoring why CSRF protections are essential for modifying data on behalf of authenticated users

CSRF prevention: How to stop it

Fortunately, there are solid ways to defend against these kinds of cybersecurity threats. Most modern web development frameworks have built-in protections, but it's good to know what they are.

  • Anti-CSRF tokens: The most common and robust defense is the use of anti-CSRF tokens. The application generates a unique, unpredictable token for each user session and embeds it in hidden fields within forms. When a user submits the form, the token is sent back to the server, which validates it. Since an attacker can't guess this token, they can't forge a valid request. As ≈, a leading nonprofit focused on software security, explains, this method is highly effective.

  • SameSite cookies: This is a browser-level security mechanism that developers can use to control whether cookies are sent with cross-site requests. By setting a cookie's SameSite attribute to Strict or Lax, a developer can prevent the browser from sending the session cookie with a cross-site request, which neuters the CSRF attack. You can find more technical details about this method in resources like the CISA (Cybersecurity & Infrastructure Security Agency) security tips.

  • User interaction: Requiring user interaction for sensitive actions—like re-entering a password or solving a CAPTCHA before changing an email address—can also prevent CSRF. It ensures the legitimate user is present and consenting to the action.

Key takeaways

Cross-Site Request Forgery (CSRF) is an attack that tricks authenticated users into performing actions they didn't intend to. This cybersecurity threat works by exploiting the trust an application has in a logged-in user's browser. Successful CSRF attacks can lead to unauthorized fund transfers, data theft, or complete account takeovers.The best defenses include using anti-CSRF tokens and implementing SameSite cookies to validate that requests are coming from the original application, not a malicious third-party site.

Glitch effect

Related Resources


  • Understanding XSRF in Cybersecurity: A Complete Guide
    Understanding XSRF in Cybersecurity: A Complete Guide
    Learn what XSRF (Cross-Site Request Forgery) is, how it works, and how to prevent it. Protect your web apps with expert-approved security practices.
  • What Is Same Origin Policy
    What Is Same Origin Policy
    Learn what the same origin policy is, how it works, and its role in web security. Explore examples, CORS relations, and tips for developers.
  • What is Session Hijacking? The Silent Threat Bypassing MFA
    What is Session Hijacking? The Silent Threat Bypassing MFA
    Session hijacking allows attackers to bypass MFA by stealing session tokens. Learn how AitM attacks work and how to detect them before damage occurs
  • What Is Cross-Site Scripting (XSS)?
    What Is Cross-Site Scripting (XSS)?
    Learn what Cross-Site Scripting (XSS) is, how it works, and how to prevent it. A must-read guide for securing web applications and protecting user data.
  • What are Cookies on the Internet? Everything You Need to Know
    What are Cookies on the Internet? Everything You Need to Know
    Cookies play a crucial role in enhancing your online experience, but what are cookies, and are there any known risks to accepting them? Learn more from Huntress
  • Cookie Logger Explained for Cybersecurity Pros and Learners
    Cookie Logger Explained for Cybersecurity Pros and Learners
    Learn what a cookie logger is, why attackers use them, and how to stop cookie logging attacks right now. Stay secure and get up-to-date protection tips.
  • What is Token Theft?
    What is Token Theft?
    Learn about token theft, how attackers exploit stolen authentication tokens, and actionable steps to protect your accounts and systems.
  • What is a User Agent?
    What is a User Agent?
    Discover what a user agent is and how it facilitates web interactions. Learn about User-Agent strings and their role in web optimization.
  • What is XML External Entity Injection (XXE)?
    What is XML External Entity Injection (XXE)?
    Learn about XML External Entity Injection (XXE)—a vulnerability that exploits XML parsers. Understand how XXE works and how to protect against it.

Protect What Matters

Secure endpoints, email, and employees with the power of our 24/7 SOC. Try Huntress for free and deploy in minutes to start fighting threats.
Try Huntress for Free
Huntress Managed Security PlatformManaged EDRManaged EDR for macOSManaged EDR for LinuxManaged ITDRManaged SIEMManaged Security Awareness TrainingBook a Demo
PhishingComplianceBusiness Email CompromiseEducationFinanceHealthcareManufacturingState & Local Government
Managed Service ProvidersResellersIT & Security Teams24/7 SOCCase Studies
BlogResource CenterCybersecurity 101Upcoming EventsSupport Documentation
Our CompanyLeadershipNews & PressCareersContact Us
Huntress white logo

Protecting 215k+ customers like you with enterprise-grade protection.

Privacy PolicyCookie PolicyTerms of UseCookie Consent
Linkedin iconTwitter X iconYouTube iconInstagram icon
© 2025 Huntress All Rights Reserved.

Join the Hunt

Get insider access to Huntress tradecraft, killer events, and the freshest blog updates.

By submitting this form, you accept our Terms of Service & Privacy Policy