CVE-2025-48042: Ash Before Action, Ash's Hooks May Vulnerability

HIGH
Advisory Identifier: GHSA-jj4j-x5ww-cwh9
CVSS 5.6
CWE-863
Published
Advisory Summary

CVE-2025-48042 is a HIGH (CVSS 5.6) before action, ash's hooks may vulnerability (CWE-863: Incorrect Authorization) affecting Ash libraries in the Hex ecosystem. The issue involves before action, ash's hooks may execute in certain scenarios despite a request being forbidden. Remediation is available by upgrading affected packages to version 3.5.39.

CVE-2025-48042 at a Glance

CVE Identifier CVE-2025-48042
GHSA Identifier GHSA-jj4j-x5ww-cwh9
Severity HIGH
CVSS v3.1 Base Score 5.6
CWE Classification CWE-863: Incorrect Authorization
Affected Product Ash
Package Ecosystem Hex
Published Date
Last Updated

Security Impact

CVSS: 5.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2025-48042

To remediate this vulnerability, upgrade all affected Ash dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ash fixed: 3.5.39
Upgrade ash to 3.5.39
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for ash

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-48042, inspect your project dependencies for Ash:

inspect dependencies for ash

Analyze the terminal output to locate any version of Ash in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.5.39), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Ash, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Certain bulk action calls with a `before_transaction` hook and no `after_transaction` hook, will call the `before_transaction` 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 `before_transaction` to run even though they are not authorized to perform the whole action. The `before_action` could run a sensitive/expensive operation. ### Impact A malicious user could cause a `before_action` 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 before_transaction hook on it, and no after_transaction 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 before_transaction callbacks. If those before_transaction 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. `before_transaction` 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 before_transaction 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 before_transaction hooks to prevent them from doing their logic before they should.

CVE-2025-48042 Affected Ash Versions

1 component(s)
Fixed Versions:
3.5.39
Product / Package Ecosystem Affected Versions Fixed Version
ash
Hex
< 3.5.39
3.5.39

References

Frequently Asked Questions

What is CVE-2025-48042?
CVE-2025-48042 is a security vulnerability in Ash involving Before action, Ash's hooks may execute in certain scenarios despite a request being forbidden under CWE-863: Incorrect Authorization.
Which Ash versions are affected?
Affected versions include releases prior to 3.5.39 across affected packages: ash.
What version fixes CVE-2025-48042?
Upgrading to 3.5.39 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ash affected?
Yes, ash is affected in releases prior to 3.5.39. Upgrade your dependency to 3.5.39 or later.
What is the CVSS score of CVE-2025-48042?
CVE-2025-48042 has a CVSS v3.1 base score of 5.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2025-48042?
CVE-2025-48042 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Hex dependencies for CVE-2025-48042?
Run the dependency tree command: 'inspect dependencies for ash'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jj4j-x5ww-cwh9",
  "modified" : "2026-04-06T23:15:03Z",
  "published" : "2025-09-15T16:28:24Z",
  "aliases" : [ "CVE-2025-48042" ],
  "summary" : "Before action, Ash's hooks may execute in certain scenarios despite a request being forbidden",
  "details" : "### Summary\nCertain bulk action calls with a `before_transaction` hook and no `after_transaction` hook, will call the `before_transaction` hook before authorization is checked and a Forbidden error is returned, when called as a bulk action.\n\nThe impact is that a malicious user could cause a `before_transaction` to run even though they are not authorized to perform the whole action. The `before_action` could run a sensitive/expensive operation.\n\n### Impact\nA malicious user could cause a `before_action` to run even though they are not authorized to perform the whole action.\n\nYou are affected if you have an create, update or destroy action that:\n\n- has a before_transaction hook on it, and no after_transaction hook on it.\n- is being used via an `Ash.bulk_*` callback (which AshJsonApi and AshGraphql do for update/destroy actions)\n\nWhether or not or how much it matters depends on the nature of those before_transaction callbacks. If those before_transaction callbacks are side-effectful, or just doing something like looking up some external data. If your API endpoints are behind authentication and what kind. \n\n### Severity\n\nThe severity for this was hard to gauge. `before_transaction` 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.\n\nIt is currently marked as High, given that we really don't know what logic folks are putting in their before_transaction hooks and it could theoretically be very bad.\n\n### Workarounds\n\nYou should update ASAP, but if for whatever reason you cannot update, you can add logic to those before_transaction hooks to prevent them from doing their logic before they should.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "ash"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.5.39"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.5.38"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ash-project/ash/security/advisories/GHSA-jj4j-x5ww-cwh9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48042"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ash-project/ash/commit/5d1b6a5d00771fd468a509778637527b5218be9a"
  }, {
    "type" : "WEB",
    "url" : "https://cna.erlef.org/cves/CVE-2025-48042.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ash-project/ash"
  }, {
    "type" : "WEB",
    "url" : "https://osv.dev/vulnerability/EEF-CVE-2025-48042"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-15T16:28:24Z",
    "nvd_published_at" : "2025-09-07T16:15:51Z"
  }
}