Am I affected?

type your ueberauth_apple version to check

Description

Authentication Bypass by Spoofing vulnerability in ueberauth ueberauth_apple allows account takeover via unvalidated ID token claims.

The Ueberauth.Strategy.Apple.Token.payload/2 function verifies the JWT signature of the callback id_token against Apple's JWKS but does not validate any registered claims. The iss, aud, exp, and iat claims are read from the token and passed on to Ueberauth.Strategy.Apple.handle_callback!/1, which derives the logged-in user's uid and email directly from the unvalidated sub claim.

An attacker who obtains any Apple-signed ID token bearing the victim's sub (via a captured expired token, or via an ID token issued to a sibling client in the same Apple developer team) can replay it against the vulnerable callback and be authenticated as the victim. The absent exp check makes stolen tokens usable indefinitely, and the absent aud check enables cross-application account takeover across clients that share an Apple developer team.

This issue affects ueberauth_apple: from 0.1.0 before 0.6.2.

Weaknesses & attack patterns

Weakness

CWE-290 · Authentication Bypass by Spoofing in catalog → MITRE ↗

Attack patterns

CAPEC-60 · Reusing Session IDs (aka Session Replay) MITRE ↗

Affected — Hex / ueberauth_apple Hex.pm ↗ Repository ↗

0.1.0 < 0.6.2 affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:ueberauth:ueberauth_apple:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ueberauth.Strategy.Apple' · 'Elixir.Ueberauth.Strategy.Apple.Token'
source files lib/ueberauth/strategy/apple.ex · lib/ueberauth/strategy/apple/token.ex
routines 'Elixir.Ueberauth.Strategy.Apple':handle_callback!/1 · 'Elixir.Ueberauth.Strategy.Apple.Token':payload/2

Affected — GitHub / ueberauth/ueberauth_apple Repository ↗

3908a18 < 01e2d9c affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:ueberauth:ueberauth_apple:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ueberauth.Strategy.Apple' · 'Elixir.Ueberauth.Strategy.Apple.Token'
source files lib/ueberauth/strategy/apple.ex · lib/ueberauth/strategy/apple/token.ex
routines 'Elixir.Ueberauth.Strategy.Apple':handle_callback!/1 · 'Elixir.Ueberauth.Strategy.Apple.Token':payload/2

References

Credits

0xRenSec Finder
AJ Foster Remediation developer
Jonatan Männchen / EEF Analyst

CVSS breakdown

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
« All CVEs