Am I affected?

type your oidcc_plug version to check

Description

Improper Handling of Case Sensitivity vulnerability in Erlang Ecosystem Foundation oidcc_plug (Oidcc.Plug.Authorize module) renders the user agent session binding inert, removing a defense in depth control against replay of a stolen session.

This vulnerability is associated with program files lib/oidcc/plug/authorize.ex and lib/oidcc/plug/authorization_callback.ex, and program routines Oidcc.Plug.Authorize.call/2 and Oidcc.Plug.AuthorizationCallback.call/2.

Oidcc.Plug.Authorize.call/2 reads the initiating client's user agent with get_req_header(conn, "User-Agent"). Plug lowercases incoming header names, but get_req_header/2 matches the supplied key exactly and performs no normalization of its own, so the mixed-case lookup always returns an empty list and nil is written into the session. On the callback side, Oidcc.Plug.AuthorizationCallback treats a stored nil user agent as nothing to compare and returns :ok without inspecting the request. The two behaviours combine so that the check passes unconditionally on every request, including for deployments that explicitly opted in with check_useragent: true, and an authorization callback can be completed from a different user agent than the one that initiated the flow without detection. The check fails open silently, with no error and no log entry, so a deployment cannot tell the binding is absent.

The impact is limited to defense in depth. The inert check does not by itself allow an attacker to complete an authorization flow; it removes one layer that would otherwise hinder use of a stolen or leaked session, such as an exfiltrated session cookie replayed from a different client. The CSRF/state, nonce, and PKCE checks are unaffected and continue to function. Deployments that never enabled check_useragent are not affected in practice, since they never expected the binding. The corresponding lookup in Oidcc.Plug.AuthorizationCallback correctly uses the lowercase key and is not affected.

This issue affects oidcc_plug: from 0.1.0-alpha.3 before 0.5.0.

Weaknesses & attack patterns

Weakness

CWE-178 · Improper Handling of Case Sensitivity in catalog → MITRE ↗

Attack patterns

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

Affected — Hex / oidcc_plug Hex.pm ↗ Repository ↗

≥ 0.1.0-alpha.3 < 0.5.0 affected
every other version: unaffected
cpe cpe:2.3:a:erlef:oidcc_plug:*:*:*:*:*:erlang:*:*
version type semver
modules · source files · routines
modules Elixir.Oidcc.Plug.Authorize · Elixir.Oidcc.Plug.AuthorizationCallback
source files lib/oidcc/plug/authorize.ex · lib/oidcc/plug/authorization_callback.ex
routines 'Elixir.Oidcc.Plug.Authorize':call/2 · 'Elixir.Oidcc.Plug.AuthorizationCallback':call/2

Affected — GitHub / erlef/oidcc_plug Repository ↗

≥ 0a75fb1 < f15e52c affected
every other version: unaffected
cpe cpe:2.3:a:erlef:oidcc_plug:*:*:*:*:*:erlang:*:*
version type git
modules · source files · routines
modules Elixir.Oidcc.Plug.Authorize · Elixir.Oidcc.Plug.AuthorizationCallback
source files lib/oidcc/plug/authorize.ex · lib/oidcc/plug/authorization_callback.ex
routines 'Elixir.Oidcc.Plug.Authorize':call/2 · 'Elixir.Oidcc.Plug.AuthorizationCallback':call/2

References

Credits

Mathias Polligkeit Finder Remediation reviewer
Jonatan Männchen / EEF Coordinator Remediation developer

CVSS breakdown

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

Exploitability

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None

Vulnerable System

Confidentiality
None
Integrity
Low
Availability
None

Subsequent Systems

Confidentiality
None
Integrity
None
Availability
None
« All CVEs