CVE-2025-48042: Before action hooks may execute in certain scenarios despite a request being forbidden

Published Sep 7, 2025
·
Updated

Summary Certain bulk action calls with a beforetransaction hook and no aftertransaction hook, will call the beforetransaction hook before authorization is checked and a Forbidden error is returned, when called as a bulk action.

The impact is that a malicious user could cause a beforetransaction to run even though they are not authorized to perform the whole action. The beforeaction could run a sensitive/expensive operation.

Impact A malicious user could cause a beforeaction to run even though they are not authorized to perform the whole action.

You are affected if you have an create, update or destroy action that:

- has a beforetransaction hook on it, and no aftertransaction hook on it. - is being used via an Ash.bulk callback (which AshJsonApi and AshGraphql do for update/destroy actions)

Whether or not or how much it matters depends on the nature of those beforetransaction callbacks. If those beforetransaction callbacks are side-effectful, or just doing something like looking up some external data. If your API endpoints are behind authentication and what kind.

Severity

The severity for this was hard to gauge. beforetransaction hooks are not that commonly used. Additionally, any attacker must know which of these things are available to them, be authenticated to make such a request (i.e you very rarely have policies preventing the running of anonymous queries), so privileges and inside knowledge are required. Additionally, the action will always return a forbidden error, so no information is revealed. We will evaluate and adjust the severity in the next few days as needed.

It is currently marked as High, given that we really don't know what logic folks are putting in their beforetransaction hooks and it could theoretically be very bad.

Workarounds

You should update ASAP, but if for whatever reason you cannot update, you can add logic to those beforetransaction hooks to prevent them from doing their logic before they should.

Other sources

Incorrect Authorization vulnerability in ash-project ash allows Exploiting Incorrectly Configured Access Control Security Levels. This vulnerability is associated with program files lib/ash/actions/create/bulk.ex, lib/ash/actions/destroy/bulk.ex, lib/ash/actions/update/bulk.ex and program routines 'Elixir.Ash.Actions.Create.Bulk':run/5, 'Elixir.Ash.Actions.Destroy.Bulk':run/6, 'Elixir.Ash.Actions.Update.Bulk:run'/6.

This issue affects ash: from 0.1.0 before 3.5.39.

MITRE

Incorrect Authorization vulnerability in ash-project ash allows Exploiting Incorrectly Configured Access Control Security Levels. This vulnerability is associated with program files lib/ash/actions/create/bulk.ex, lib/ash/actions/destroy/bulk.ex, lib/ash/actions/update/bulk.ex and program routines 'Elixir.Ash.Actions.Create.Bulk':run/5, 'Elixir.Ash.Actions.Destroy.Bulk':run/6, 'Elixir.Ash.Actions.Update.Bulk:run'/6.

This issue affects ash: from pkg:hex/ash before pkg:hex/ash@3.5.39, before 3.5.39, before 5d1b6a5d00771fd468a509778637527b5218be9a.

NVD

Affected Software

2 affected componentsFixes available
Ash ash<3.5.39
erlang/ash<=3.5.38
3.5.39

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade erlang/ash to a version that resolves this vulnerability.

    Fixed in 3.5.39
  2. Upgrade

    Upgrade ash to a version that resolves this vulnerability.

    Fixed in 3.5.39
  3. Configuration

    In affected Ash resources that define create/update/destroy bulk actions with before_transaction hooks and no after_transaction hook, update those before_transaction callbacks to prevent the sensitive/expensive work from running before authorization is checked. (As a workaround, move/guard side effects behind an explicit authorization check in the before_transaction hook.)

    before_transaction hooks (Ash create/update/destroy bulk actions) guard side-effectful logic until authorization is confirmed = Add a check at the start of each affected before_transaction hook so any side effects/expensive/external lookups only run after the caller is authorized for the full action.

Event History

Sep 7, 2025
CVE Published
via MITRE·04:01 PM
Data Sourced
via MITRE·04:01 PM
DescriptionWeakness
Data Sourced
via NVD·04:15 PM
DescriptionSeverityWeakness
Sep 15, 2025
Advisory Published
via GitHub·04:28 PM
Data Sourced
via GitHub·04:28 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-48042?

CVE-2025-48042 is considered a high severity vulnerability due to its potential impact on authorization controls.

2

How do I fix CVE-2025-48042?

To fix CVE-2025-48042, ensure that proper access control security levels are configured in affected actions within the Ash Project ash software.

3

What kind of vulnerability is CVE-2025-48042?

CVE-2025-48042 is an Incorrect Authorization vulnerability that allows exploitation due to misconfigured access control.

4

Which versions of Ash Project ash are affected by CVE-2025-48042?

CVE-2025-48042 affects Ash Project ash versions up to 3.5.39.

5

What files are associated with the CVE-2025-48042 vulnerability?

CVE-2025-48042 is associated with the files lib/ash/actions/create/bulk.ex, lib/ash/actions/destroy/bulk.ex, and lib/ash/actions/update/bulk.ex.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203