CVE-2026-12740
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedPlack::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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidencePlack::Middleware::OAuth through version 0.10 lacks OAuth 2.0 state parameter support, allowing login CSRF attacks. The middleware's RequestTokenV2 does not generate a state value during authorization redirects, and AccessTokenV2 does not validate that callback requests originated from the current session, enabling attackers to bind their OAuth identity to victim sessions.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify Plack::Middleware::OAuth installation and versionRun 'perldoc Plack::Middleware::OAuth' or check your Perl library path for the module version file. Alternatively, use 'cpan -m Plack::Middleware::OAuth' or check your cpanfile/cpanfile.snapshot for the installed version.Affected if The installed version is 0.10 or earlier (any version through 0.10 is affected)
-
Determine if OAuth 2.0 flows are in useInspect your application code or Plack configuration files for usage of RequestTokenV2 or AccessTokenV2 methods from Plack::Middleware::OAuth. Look for references to these endpoints in your middleware stack configuration.Affected if Your application uses RequestTokenV2 or AccessTokenV2 for OAuth 2.0 authentication flows
-
Check for external state parameter validationReview your application code to determine whether you have implemented custom state parameter generation during authorization redirects and custom validation during callback processing, separate from what Plack::Middleware::OAuth provides.Affected if No custom state parameter validation is implemented in your application layer to compensate for the missing middleware support
-
Verify callback URL configurationExamine your OAuth configuration to identify the callback URLs configured. The vulnerability allows attackers to inject their own identity if the callback is not validated against session-bound state.Affected if Your application uses OAuth 2.0 callbacks through this middleware without session-bound state validation
You are affected if you use Plack::Middleware::OAuth version 0.10 or earlier with OAuth 2.0 endpoints (V2) and have not implemented external state parameter validation to compensate for the middleware's lack of state generation and validation.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedReplace Plack::Middleware::OAuth with a library that properly implements OAuth 2.0 state parameter generation and validation, or implement a compensating control that validates session-bound state before token exchange.
Check https://github.com/c9s/Plack-Middleware-OAuth/releases for a version newer than 0.10 that includes the fix; as of this advisory, version 0.10 is the latest release
- 1. Review the vendor patch at https://github.com/c9s/Plack-Middleware-OAuth/pull/13 to understand the state parameter implementation
- 2. If the patch is not yet merged into a released version, apply the patch manually to your local installation
- 3. After applying the patch, verify that RequestTokenV2 now generates and stores a unique state parameter in the session before redirecting to the OAuth provider
- 4. Verify that AccessTokenV2 now validates the state parameter returned in the callback matches the one stored in the session before processing the token
- 5. Test the OAuth 2.0 login flow to confirm the CSRF protection works correctly
- 6. Deploy the patched middleware to production
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation3.0 h
- Implementation6.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,224.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-12740 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-12740 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data