CVE-2026-12740: CWE-352 Cross-Site Request Forgery (CSRF) in CORNELIUS Plack::Middleware::OAuth
Plack::Middleware::OAuth versions up to 0.10 for Perl do not implement the OAuth 2.0 state parameter, leading to a Cross-Site Request Forgery (CSRF) vulnerability. This flaw allows an attacker to initiate an OAuth authorization with their own provider account and then deliver the callback to a victim's session. As a result, the victim's session may be linked to the attacker's provider identity and access token, potentially granting the attacker persistent access to the victim's account if the application persists this association.
AI Analysis
Technical Summary
The vulnerability in Plack::Middleware::OAuth (<=0.10) arises because the middleware does not support the OAuth 2.0 state parameter, which is critical for binding authorization requests to user sessions. The RequestTokenV2 function builds the authorization redirect without issuing a state value, and AccessTokenV2 registers the token into the session without verifying that the callback corresponds to the session that initiated the authorization. This enables login CSRF attacks where an attacker can cause a victim's session to complete the attacker's OAuth authorization, associating the victim's session with the attacker's credentials.
Potential Impact
An attacker can exploit this vulnerability to link their own OAuth provider identity and access token to a victim's session. If the application persists this link as an account association, the attacker may gain unauthorized access to the victim's account through their own provider credentials. This compromises the integrity of user sessions and authentication flows relying on this middleware.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, applications using Plack::Middleware::OAuth for OAuth 2.0 login should implement their own verification of the OAuth 2.0 state parameter to bind authorization requests to user sessions and prevent login CSRF attacks.
CVE-2026-12740: CWE-352 Cross-Site Request Forgery (CSRF) in CORNELIUS Plack::Middleware::OAuth
Description
Plack::Middleware::OAuth versions up to 0.10 for Perl do not implement the OAuth 2.0 state parameter, leading to a Cross-Site Request Forgery (CSRF) vulnerability. This flaw allows an attacker to initiate an OAuth authorization with their own provider account and then deliver the callback to a victim's session. As a result, the victim's session may be linked to the attacker's provider identity and access token, potentially granting the attacker persistent access to the victim's account if the application persists this association.
Affected software
pkg:github/Plack-Middleware-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 Plack::Middleware::OAuth (<=0.10) arises because the middleware does not support the OAuth 2.0 state parameter, which is critical for binding authorization requests to user sessions. The RequestTokenV2 function builds the authorization redirect without issuing a state value, and AccessTokenV2 registers the token into the session without verifying that the callback corresponds to the session that initiated the authorization. This enables login CSRF attacks where an attacker can cause a victim's session to complete the attacker's OAuth authorization, associating the victim's session with the attacker's credentials.
Potential Impact
An attacker can exploit this vulnerability to link their own OAuth provider identity and access token to a victim's session. If the application persists this link as an account association, the attacker may gain unauthorized access to the victim's account through their own provider credentials. This compromises the integrity of user sessions and authentication flows relying on this middleware.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, applications using Plack::Middleware::OAuth for OAuth 2.0 login should implement their own verification of the OAuth 2.0 state parameter to bind authorization requests to user sessions and prevent login CSRF attacks.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-06-19T16:43:08.971Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a494f4d27e9c79719ca6cf7
Added to database: 07/04/2026, 18:22:05 UTC
Last enriched: 07/04/2026, 18:36:28 UTC
Last updated: 07/04/2026, 18:51:00 UTC
Views: 6
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.