CVE-2026-12746: CWE-352 Cross-Site Request Forgery (CSRF) in BIAFRA Dancer2::Plugin::Auth::OAuth::Provider
Dancer2::Plugin::Auth::OAuth::Provider versions before 0.23 for Perl do not support the OAuth 2.0 state parameter. The authentication_url method builds the provider authorization redirect without issuing a state value, and the callback method exchanges the callback code and registers the resulting token into the session without verifying that the callback corresponds to an authorization request this session initiated. Any application that uses this plugin for OAuth 2.0 login is exposed to login cross-site request forgery: because the callback is not bound to the session that began the flow, an attacker who starts an authorization with their own provider account can deliver the resulting callback to a victim, causing the victim's session to complete the attacker's authorization and associating the attacker's provider identity and access token with that session. Where the application persists this as an account link, the attacker may retain access to the victim's account through their own provider credentials.
AI Analysis
Technical Summary
The vulnerability in Dancer2::Plugin::Auth::OAuth::Provider (versions <0.23) arises from the lack of support for the OAuth 2.0 state parameter, which is designed to prevent CSRF attacks during OAuth login flows. Specifically, the authentication_url method does not generate a state value, and the callback method does not verify that the callback matches the session that initiated the OAuth authorization. This flaw enables an attacker to initiate an OAuth authorization with their own provider account and then deliver the resulting callback to a victim's session, causing the victim's session to be linked with the attacker's OAuth credentials. If the application persists this association as an account link, the attacker may gain persistent access to the victim's account via their own provider credentials.
Potential Impact
Successful exploitation allows an attacker to perform login CSRF, causing a victim's session to be linked to the attacker's OAuth provider identity and access token. This can lead to unauthorized access to the victim's account if the application uses this plugin for OAuth 2.0 login and persists the account linkage. The vulnerability has a high severity with a CVSS score of 8.1, indicating a significant risk of confidentiality and integrity compromise without impacting availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, applications using this plugin should consider implementing their own verification of the OAuth 2.0 state parameter to bind authorization requests to user sessions. Avoid relying solely on this plugin for OAuth 2.0 login flows without additional CSRF protections.
CVE-2026-12746: CWE-352 Cross-Site Request Forgery (CSRF) in BIAFRA Dancer2::Plugin::Auth::OAuth::Provider
Description
Dancer2::Plugin::Auth::OAuth::Provider versions before 0.23 for Perl do not support the OAuth 2.0 state parameter. The authentication_url method builds the provider authorization redirect without issuing a state value, and the callback method exchanges the callback code and registers the resulting token into the session without verifying that the callback corresponds to an authorization request this session initiated. Any application that uses this plugin for OAuth 2.0 login is exposed to login cross-site request forgery: because the callback is not bound to the session that began the flow, an attacker who starts an authorization with their own provider account can deliver the resulting callback to a victim, causing the victim's session to complete the attacker's authorization and associating the attacker's provider identity and access token with that session. Where the application persists this as an account link, the attacker may retain access to the victim's account through their own provider credentials.
CVSS v3.1
Score 8.1high
Affected software
pkg:github/Dancer2-Plugin-Auth-OAuthRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Dancer2::Plugin::Auth::OAuth::Provider (versions <0.23) arises from the lack of support for the OAuth 2.0 state parameter, which is designed to prevent CSRF attacks during OAuth login flows. Specifically, the authentication_url method does not generate a state value, and the callback method does not verify that the callback matches the session that initiated the OAuth authorization. This flaw enables an attacker to initiate an OAuth authorization with their own provider account and then deliver the resulting callback to a victim's session, causing the victim's session to be linked with the attacker's OAuth credentials. If the application persists this association as an account link, the attacker may gain persistent access to the victim's account via their own provider credentials.
Potential Impact
Successful exploitation allows an attacker to perform login CSRF, causing a victim's session to be linked to the attacker's OAuth provider identity and access token. This can lead to unauthorized access to the victim's account if the application uses this plugin for OAuth 2.0 login and persists the account linkage. The vulnerability has a high severity with a CVSS score of 8.1, indicating a significant risk of confidentiality and integrity compromise without impacting availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, applications using this plugin should consider implementing their own verification of the OAuth 2.0 state parameter to bind authorization requests to user sessions. Avoid relying solely on this plugin for OAuth 2.0 login flows without additional CSRF protections.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-06-19T17:42:35.807Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a494f4d27e9c79719ca6cfd
Added to database: 07/04/2026, 18:22:05 UTC
Last enriched: 07/12/2026, 08:55:27 UTC
Last updated: 08/18/2026, 10:54:21 UTC
Views: 110
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.