← Back to CVE Explorer

CVE-2026-12740

Full vulnerability record from the local CVENow database.

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.

Severity
HIGH
CVSS score
8.1 (v3.1)
Vulnerability status
Deferred
Source identifier
9b29abf9-4ab0-4765-b253-1875cd9b441e
Published
2026-07-04 18:16:28.133000
Last modified
2026-10-25 15:10:00.147000
View original CVE JSON
{
  "id": "CVE-2026-12740",
  "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
  "published": "2026-07-04T18:16:28.133",
  "lastModified": "2026-10-25T15:10:00.147",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "Plack::Middleware::OAuth versions through 0.10 for Perl do not support the OAuth 2.0 state parameter.\n\nRequestTokenV2 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.\n\nAny 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."
    },
    {
      "lang": "es",
      "value": "Las versiones de Plack::Middleware::OAuth hasta la 0.10 para Perl no soportan el parámetro state de OAuth 2.0.\n\nRequestTokenV2 construye la redirección de autorización del proveedor sin emitir un valor state, y AccessTokenV2 intercambia el código de devolución de llamada y registra el token resultante en la sesión (register_session) sin verificar que la devolución de llamada corresponde a una petición de autorización que esta sesión inició.\n\nCualquier aplicación que usa este middleware para el inicio de sesión de OAuth 2.0 está expuesta a la falsificación de petición en sitios cruzados de inicio de sesión: debido a que la devolución de llamada no está vinculada a la sesión que inició el flujo, un atacante que inicia una autorización con su propia cuenta de proveedor puede entregar la devolución de llamada resultante a una víctima, haciendo que la sesión de la víctima complete la autorización del atacante y asociando la identidad del proveedor y el token de acceso del atacante con esa sesión. Donde la aplicación persiste esto como un enlace de cuenta, el atacante puede retener el acceso a la cuenta de la víctima a través de sus propias credenciales de proveedor."
    }
  ],
  "affected": [
    {
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "affectedData": [
        {
          "vendor": "CORNELIUS",
          "product": "Plack::Middleware::OAuth",
          "defaultStatus": "unaffected",
          "collectionURL": "https://cpan.org/modules",
          "packageName": "Plack-Middleware-OAuth",
          "programFiles": [
            "lib/Plack/Middleware/OAuth/Handler/AccessTokenV2.pm",
            "lib/Plack/Middleware/OAuth/Handler/RequestTokenV2.pm"
          ],
          "repo": "https://github.com/c9s/Plack-Middleware-OAuth",
          "versions": [
            {
              "version": "0",
              "lessThanOrEqual": "0.10",
              "versionType": "custom",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
          "baseScore": 8.1,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "REQUIRED",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 2.8,
        "impactScore": 5.2
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-07-06T13:54:10.583390Z",
          "id": "CVE-2026-12740",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "total"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-352"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://datatracker.ietf.org/doc/html/rfc6749#section-10.12",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    },
    {
      "url": "https://github.com/c9s/Plack-Middleware-OAuth/pull/13",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    },
    {
      "url": "https://rt.cpan.org/Ticket/Display.html?id=179874",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    },
    {
      "url": "https://security.metacpan.org/patches/P/Plack-Middleware-OAuth/0.10/CVE-2026-12740-r1.patch",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    },
    {
      "url": "http://www.openwall.com/lists/oss-security/2026/07/04/10",
      "source": "af854a3a-2127-422b-91ae-364da2661108"
    }
  ]
}