CSRF bypass via pre-login token preservation
Published Apr 21, 2023 · Updated Feb 4, 2025
CSRF token fixation in @fastify/passport before 1.1.0 and 2.0.0 through 2.2.0 allows remote attackers to forge authenticated requests. The authentication path preserves the session's _csrf value across login, leaving a token generated for the attacker's pre-session valid afterward. Exploitation requires a same-site attacker to plant that pre-session cookie and the victim to authenticate before a forged state-changing request is submitted.
Summary
What happened
CSRF token fixation in @fastify/passport before 1.1.0 and 2.0.0 through 2.2.0 allows remote attackers to forge authenticated requests. The authentication path preserves the session's _csrf value across login, leaving a token generated for the attacker's pre-session valid afterward. Exploitation requires a same-site attacker to plant that pre-session cookie and the victim to authenticate before a forged state-changing request is submitted.
The record
- CVE
- CVE-2023-29020
- Published
- Apr 21, 2023
- Updated
- Feb 4, 2025
- Vendor
- Fastify
- Product
- @fastify/passport
- Classifications
- CWE-384, CWE-352, T1190
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Apr 21, 2023CVE publishedPublication date reported by the CVE source.
- Feb 4, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 1.1.0
- Affected versionversion=>= 2.0.0, < 2.3.0
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo