{"id":"EEF-CVE-2026-118505","summary":"AshAuthentication brute_force_strategy does not limit sign-in and request actions defined on the resource","details":"## Summary\n\nImproper Restriction of Excessive Authentication Attempts vulnerability in team-alembic ash_authentication allows an unauthenticated attacker to guess passwords and one-time passwords without limit.\n\nThe password, magic link and OTP strategies enforce `brute_force_strategy` by adding a preparation only to the actions they generate. When the resource defines one of those actions itself, the strategy uses it as written and nothing checked that it carried the preparation, so the setting compiled and applied no limit. The generators produce exactly this: `mix ash_authentication.install` writes `sign_in_with_password`, `request_password_reset_token` and `request_magic_link`, `mix ash_authentication.upgrade` then adds `brute_force_strategy` to those strategies, and `mix ash_authentication.add_strategy.otp` writes its OTP actions without the preparation. Separately, with `registration_enabled? true` the OTP sign-in is a create action, which preparations do not run on, so `brute_force_strategy {:preparation, module}` never applied to it.\n\nThis issue affects ash_authentication: from 5.0.0-rc.4 before 5.0.0-rc.16.\n\n## Workarounds\n\nAdd the brute-force preparation to each protected action defined on the resource, or remove the action so the strategy generates it. For `brute_force_strategy {:audit_log, name}` that is `prepare {AshAuthentication.AddOn.AuditLog.IdentityBruteForcePreparation, action_name: \u003caction\u003e}` on the password sign-in, password reset request, magic link request and OTP request actions, and `prepare {AshAuthentication.AddOn.AuditLog.BruteForcePreparation, action_name: \u003caction\u003e}` on a read OTP sign-in action. For `{:preparation, MyModule}` it is `prepare MyModule`. For OTP with `registration_enabled? true`, switch to `brute_force_strategy :rate_limit`.\n\n## Configurations\n\nA password, magic link or OTP strategy sets `brute_force_strategy` and one of its protected actions (password sign-in, password reset request, magic link request, OTP sign-in or OTP request) is defined on the resource without the matching brute-force preparation, as on resources set up by the installer, the upgrade task or the OTP generator. Alternatively, an OTP strategy sets `registration_enabled? true` with `brute_force_strategy {:preparation, module}`. Actions the strategies generate themselves, and the OTP strategy's `:rate_limit` mode, are not affected.","aliases":["CVE-2026-118505","GHSA-55gf-3263-4r39"],"modified":"2026-11-03T16:11:17.246497203Z","published":"2026-11-03T15:47:36.067Z","database_specific":{"capec_ids":["CAPEC-49"],"cpe_ids":["cpe:2.3:a:team-alembic:ash_authentication:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-307"]},"references":[{"type":"ADVISORY","url":"https://github.com/team-alembic/ash_authentication/security/advisories/GHSA-55gf-3263-4r39"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-118505.html"},{"type":"WEB","url":"https://github.com/team-alembic/ash_authentication/commit/800caa0d4a5bee1f28ad427f4c12fab72003a577"},{"type":"FIX","url":"https://github.com/team-alembic/ash_authentication/commit/7117b5da5b73ee4cdb372e4adfbaff409b527125"},{"type":"PACKAGE","url":"https://hex.pm/packages/ash_authentication"}],"affected":[{"package":{"name":"ash_authentication","ecosystem":"Hex","purl":"pkg:hex/ash_authentication"},"ranges":[{"type":"SEMVER","events":[{"introduced":"5.0.0-rc.4"},{"fixed":"5.0.0-rc.16"}]}],"versions":["5.0.0-rc.10","5.0.0-rc.11","5.0.0-rc.12","5.0.0-rc.13","5.0.0-rc.14","5.0.0-rc.15","5.0.0-rc.4","5.0.0-rc.5","5.0.0-rc.6","5.0.0-rc.7","5.0.0-rc.8","5.0.0-rc.9"],"database_specific":{"source":"https://cna.erlef.org/osv/EEF-CVE-2026-118505.json"}},{"ranges":[{"type":"GIT","repo":"https://github.com/team-alembic/ash_authentication","events":[{"introduced":"800caa0d4a5bee1f28ad427f4c12fab72003a577"},{"fixed":"7117b5da5b73ee4cdb372e4adfbaff409b527125"}]}],"versions":["v5.0.0-rc.15","v5.0.0-rc.14","v5.0.0-rc.13","v5.0.0-rc.12","v5.0.0-rc.11","v5.0.0-rc.10","5.0.0-rc.9","5.0.0-rc.8","v5.0.0-rc.7","v5.0.0-rc.6","v5.0.0-rc.5","v5.0.0-rc.4"],"database_specific":{"source":"https://cna.erlef.org/osv/EEF-CVE-2026-118505.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"}],"credits":[{"name":"azmaveth","type":"FINDER"},{"name":"azmaveth","type":"REPORTER"},{"name":"azmaveth","type":"REMEDIATION_DEVELOPER"},{"name":"Zach Daniel / Ash Project","type":"REMEDIATION_DEVELOPER"}]}