CVE-2024-49756 AshPostgres empty, atomic, non-bulk actions, policy bypass for side-effects vulnerability.

Medium 5.3 Published Updated

Attackers can bypass authorization policies to trigger unintended side effects in specific AshPostgres update actions.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-49756?

CVE-2024-49756 is a medium-severity missing authorization vulnerability in ash-project ash_postgres, published on 23 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

AshPostgres is the PostgreSQL data layer for Ash Framework. Starting in version 2.0.0 and prior to version 2.4.10, in certain very specific situations, it was possible for the policies of an update action to be skipped. This occurred only on "empty" update actions (no changing fields), and would allow their hooks (side effects) to be performed when they should not have been. Note that this does not allow reading new data that the user should not have had access to, only triggering a side effect a user should not have been able to trigger.

To be vulnerable, an affected user must have an update action that is on a resource with no attributes containing an "update default" (updated_at timestamp, for example); can be performed atomically; does not have `require_atomic? false`; has at least one authorizer (typically `Ash.Policy.Authorizer`); and has at least one `change` (on the resource's `changes` block or in the action itself). This is where the side-effects would be performed when they should not have been.

This problem has been patched in `2.4.10` of `ash_postgres`. Several workarounds are available. Potentially affected users may determine that none of their actions are vulnerable using a script the maintainers provide in the GitHub Security Advisory, add `require_atomic? false` to any potentially affected update action, replace any usage of `Ash.update` with `Ash.bulk_update` for an affected action, and/or add an update timestamp to their action.

Weakness: CWE-552

Which versions are affected by CVE-2024-49756?

2 open source packages ship an affected version, including ash_postgres.

PackageAffectedFixed in
ash_postgres HexFrom 2.0.02.4.10
ash_postgres HexFrom 2.0.02.4.10

How do I fix CVE-2024-49756?

Upgrade ash_postgres to 2.4.10 or later.

Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.

Is CVE-2024-49756 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-49756 exists.

Sources

Also known as GHSA-hf59-7rwq-785m.

Is CVE-2024-49756 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free