CVE-2026-12740: CWE-352 Cross-Site Request Forgery (CSRF) in CORNELIUS Plack::Middleware::OAuth
Plack::Middleware::OAuth versions through 0.10 for Perl do not support the OAuth 2.0 state parameter. RequestTokenV2 builds the provider authorization redirect without issuing a state value, and AccessTokenV2 exchanges the callback code and registers the resulting token into the session (register_session) without verifying that the callback corresponds to an authorization request this session initiated. Any application that uses this middleware 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
CVE-2026-12740 describes a CSRF vulnerability in Plack::Middleware::OAuth versions <=0.10. The middleware fails to issue or verify the OAuth 2.0 state parameter during the authorization process. Specifically, RequestTokenV2 does not issue a state value in the provider authorization redirect, and AccessTokenV2 does not verify that the callback corresponds to the session that initiated the authorization. This flaw allows 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 to the attacker's OAuth credentials. Consequently, the attacker may gain persistent access to the victim's account if the application stores this association.
Potential Impact
An attacker can perform login CSRF attacks by causing a victim's session to complete an OAuth authorization initiated by the attacker. This can lead to unauthorized account linking, allowing the attacker to access the victim's account through their own OAuth provider credentials. The confidentiality and integrity of the victim's account are compromised, but availability is not affected.
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 callbacks to the initiating session, preventing CSRF attacks. Avoid relying solely on the vulnerable middleware for OAuth 2.0 flows.
CVE-2026-12740: CWE-352 Cross-Site Request Forgery (CSRF) in CORNELIUS Plack::Middleware::OAuth
Description
Plack::Middleware::OAuth versions through 0.10 for Perl do not support the OAuth 2.0 state parameter. RequestTokenV2 builds the provider authorization redirect without issuing a state value, and AccessTokenV2 exchanges the callback code and registers the resulting token into the session (register_session) without verifying that the callback corresponds to an authorization request this session initiated. Any application that uses this middleware 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/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
CVE-2026-12740 describes a CSRF vulnerability in Plack::Middleware::OAuth versions <=0.10. The middleware fails to issue or verify the OAuth 2.0 state parameter during the authorization process. Specifically, RequestTokenV2 does not issue a state value in the provider authorization redirect, and AccessTokenV2 does not verify that the callback corresponds to the session that initiated the authorization. This flaw allows 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 to the attacker's OAuth credentials. Consequently, the attacker may gain persistent access to the victim's account if the application stores this association.
Potential Impact
An attacker can perform login CSRF attacks by causing a victim's session to complete an OAuth authorization initiated by the attacker. This can lead to unauthorized account linking, allowing the attacker to access the victim's account through their own OAuth provider credentials. The confidentiality and integrity of the victim's account are compromised, but availability is not affected.
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 callbacks to the initiating session, preventing CSRF attacks. Avoid relying solely on the vulnerable middleware for OAuth 2.0 flows.
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/12/2026, 08:57:47 UTC
Last updated: 08/18/2026, 17:13:43 UTC
Views: 143
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.