{"affected":[{"package":{"ecosystem":"Hex","name":"assent","purl":"pkg:hex/assent"},"ranges":[{"events":[{"introduced":"0.1.25"},{"fixed":"0.3.2"}],"type":"SEMVER"}],"versions":["0.1.25","0.1.26","0.1.27","0.1.28","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.2.8","0.2.9","0.2.10","0.2.11","0.2.12","0.2.13","0.3.0","0.3.1"]},{"ranges":[{"events":[{"introduced":"a2d331e8c51376d6c0b04a81aad31e0b4d4d64a3"},{"fixed":"18898bde0296152165ae470078490e5798329b1b"}],"repo":"https://github.com/pow-auth/assent","type":"GIT"}]}],"aliases":["GHSA-9fr5-g44g-9526","CVE-2026-117656"],"credits":[{"name":"Iain","type":"FINDER"},{"name":"Iain","type":"REPORTER"},{"name":"Dan Schultzer","type":"REMEDIATION_DEVELOPER"},{"name":"Richard Ash","type":"REMEDIATION_VERIFIER"},{"name":"Jonatan Männchen / EEF","type":"COORDINATOR"}],"database_specific":{"capec_ids":["CAPEC-22"],"cpe_ids":["cpe:2.3:a:pow-auth:assent:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-290","CWE-349"]},"details":"## Summary\n\nAcceptance of Extraneous Untrusted Data With Trusted Data vulnerability in the Sign in with Apple strategy in pow-auth Assent allows an unauthenticated remote attacker to impersonate another user via the `user` parameter of the authorization callback.\n\nApple posts the user's name to the callback endpoint in a `user` form parameter that the browser submits and the client controls. `Assent.Strategy.Apple.callback/2` in `lib/assent/strategies/apple.ex` decodes that parameter, and `fetch_user/2` merges it over the claims of the verified ID token, so the unverified map wins. An attacker who completes a Sign in with Apple login with their own Apple ID and edits the `user` parameter can replace `sub`, `email`, and any other claim. Applications that look up, link, or authorize accounts by the returned subject or email then act on the attacker's values.\n\nThis issue affects assent: from 0.1.25 before 0.3.2.\n\n## Details\n\n**1. Unverified input.** Apple's `form_post` response mode delivers `code`, `id_token`, `state`, and on the first authorization a `user` parameter that holds a JSON object with the user's name and email. The browser submits this parameter and Apple does not sign it, so the client controls its content.\n\n**2. Merge over verified claims.** `Assent.Strategy.Apple.callback/2` decodes the `user` parameter with `Helpers.decode_json/2` and stores the map in the config under `:user`. After `Assent.Strategy.OIDC.fetch_user/2` has validated the ID token, `Assent.Strategy.Apple.fetch_user/2` calls `Map.merge/2` with the verified claims first and the decoded parameter second. Keys from the parameter overwrite keys from the token, including `sub` and `email`.\n\n**3. Result.** `normalize/2` reads `sub` and `email` from the merged map and sets `email_verified` to true, so the application receives attacker-chosen identity fields marked as verified.\n\n**4. Fix.** Version 0.3.2 ignores the parameter by default. With `include_unverified_name: true`, only `given_name` and `family_name` are taken from it, and the verified claims are merged over them.\n\n## Proof of concept\n\n1. Start the Sign in with Apple flow of an application that uses `Assent.Strategy.Apple`.\n2. Authenticate at Apple with an Apple ID the attacker controls.\n3. Intercept the `form_post` request to the application's callback URL and set the `user` parameter to a JSON object that carries the victim's values, such as `{\"sub\": \"<victim subject>\", \"email\": \"victim@example.com\"}`.\n4. The application calls `Assent.Strategy.Apple.callback/2`. It validates the attacker's ID token and returns a user map whose `sub` and `email` are the victim's values, with `email_verified` set to true.\n\n## Impact\n\nAn attacker with any Apple ID can sign in to an application that uses the Apple strategy as any other user whose Apple subject or email they know. Account lookup, account linking, and email-based access control then act on the attacker-chosen identity.\n\n## Workarounds\n\nRemove the `user` parameter from the callback parameters before you pass them to `Assent.Strategy.Apple.callback/2`, for example with `Map.delete(params, \"user\")`. Without the parameter, `decode_user_params/2` yields an empty map and the verified ID token claims pass through unchanged. The user's name is then unavailable, because Apple delivers it only through this parameter.","id":"EEF-CVE-2026-117656","modified":"2026-10-30T23:55:23.782249Z","published":"2026-10-30T23:55:23.426Z","references":[{"type":"ADVISORY","url":"https://github.com/pow-auth/assent/security/advisories/GHSA-9fr5-g44g-9526"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-117656.html"},{"type":"WEB","url":"https://github.com/pow-auth/assent/commit/a2d331e8c51376d6c0b04a81aad31e0b4d4d64a3"},{"type":"FIX","url":"https://github.com/pow-auth/assent/commit/18898bde0296152165ae470078490e5798329b1b"},{"type":"PACKAGE","url":"https://hex.pm/packages/assent"}],"related":[],"schema_version":"1.7.3","severity":[{"score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","type":"CVSS_V4"}],"summary":"Unverified Sign in with Apple callback parameter can override verified ID token claims","upstream":[]}