diff --git a/packages/ash_authentication/GHSA-qrm9-f75w-hg4c.yml b/packages/ash_authentication/GHSA-qrm9-f75w-hg4c.yml new file mode 100644 index 0000000..881f683 --- /dev/null +++ b/packages/ash_authentication/GHSA-qrm9-f75w-hg4c.yml @@ -0,0 +1,63 @@ +--- +description: |- + ### Impact + + Applications which have been bootstrapped by the new igniter installer (since AshAuthentication v4.1.0) and who have used the magic link strategy, password resets, confirmation, or are manually revoking tokens are affected by revoked tokens being allowed to verify as valid. If you did not use the new installer, then you are absolutely not affected. + + Additionally, unless you have implemented any kind of custom token revocation feature in your application (in which case even cursory testing would have uncovered this issue), then you will not be significantly affected. + + The impact here for users is as follows: + + - For users using the magic link strategy, magic link tokens are reusable until they expire instead of being immediately revoked. By default magic link tokens are valid for 10 minutes. + - For users of password resets in the password strategy, password reset tokens are reusable until they expire instead of being immediately revoked. By default password reset tokens are valid for 3 days. + - For users of the confirmation add-on, confirmation tokens are reusable until they expire instead of being immediately revoked. By default password reset tokens are valid for 3 days. + + ### Patches + + The flaw is patched in version 4.4.9. Additionally a compile time warning is shown to users with remediation instructions if they upgrade. 4.4.9 ships with an upgrader, so if you use `mix igniter.upgrade ash_authentication` the necessary patch will be applied for you. Otherwise you can run the upgrader manually as described in the error message + + #### Example + ```elixir + [warning] Warning while compiling Tunez.Accounts.Token: + + The `:jti` and `:token` options to the `:revoked?` action must allow nil values and it must return a `:boolean`. + + This was an error in our igniter installer previous to version 4.4.9, which allowed revoked tokens to be reused. + + To fix this, run the following command in your shell: + + mix ash_authentication.upgrade 4.4.8 4.4.9 + + Or: + + - remove `allow_nil?: false` from these action arguments, and + - ensure that the action returns `:boolean`. + + like so: + + action :revoked?, :boolean do + description "Returns true if a revocation token is found for the provided token" + argument :token, :string, sensitive?: true + argument :jti, :string, sensitive?: true + + run AshAuthentication.TokenResource.IsRevoked + end + ``` + + ### Workarounds + + Delete the generated `:revoked?` generic action in your token resource This will cause it to use the one internal to AshAuthentication which has always been correct. Alternatively, manually make the changes described above. + + ### References + + See the `#ash_authentication` channel on the Ash Discord. +disclosure_date: 2025-02-11 +first_patched_versions: + - 4.4.9 +id: GHSA-qrm9-f75w-hg4c +link: https://github.com/advisories/GHSA-qrm9-f75w-hg4c +package: ash_authentication +severity: moderate +title: Ash Authentication has flawed token revocation checking logic in actions generated by `mix ash_authentication.install` +vulnerable_version_ranges: + - '>= 4.1.0, < 4.4.9' diff --git a/packages/hackney/GHSA-vq52-99r9-h5pw.yml b/packages/hackney/GHSA-vq52-99r9-h5pw.yml index 3fc9c97..6d4fabf 100644 --- a/packages/hackney/GHSA-vq52-99r9-h5pw.yml +++ b/packages/hackney/GHSA-vq52-99r9-h5pw.yml @@ -1,7 +1,5 @@ --- -description: |- - Versions of the package hackney from 0.0.0 are vulnerable to Server-side Request Forgery (SSRF) due to improper parsing of URLs by URI built-in module and hackey. Given the URL http://127.0.0.1?@127.2.2.2/, the URI function will parse and see the host as 127.0.0.1 (which is correct), and hackney will refer the host as 127.2.2.2/. - This vulnerability can be exploited when users rely on the URL function for host checking. +description: Versions of the package hackney from 0.0.0 are vulnerable to Server-side Request Forgery (SSRF) due to improper parsing of URLs by URI built-in module and hackey. Given the URL http://127.0.0.1?@127.2.2.2/, the URI function will parse and see the host as 127.0.0.1 (which is correct), and hackney will refer the host as 127.2.2.2/. This vulnerability can be exploited when users rely on the URL function for host checking. disclosure_date: 2025-02-11 first_patched_versions: -