Skip to content

GHSA-hf59-7rwq-785m CVE-2024-49756

In AshPostgres, empty, atomic, non-bulk actions, policy bypass for side-effects vulnerability.

Medium Hex
Severity
5.3 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.51%
Chance of exploitation in the next 30 days. Higher than 43.71% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-552 Files or Directories Accessible to External Parties
Fix
2.4.10
Upgrade ash_postgres to this version or later

Description

Impact

What kind of vulnerability is it? Who is impacted?

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.

You 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)
  • 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.

  • Is there ever a place where you call this action manually, using Ash.update. Note that AshGraphql and AshJsonApi action calls are not affected as they use Ash.bulk_update.
  • If so, is there ever a case where you call the action with zero inputs, and have it produce zero changing fields.
  • If so, could it then produce a side effect. This means you'd have an after_action hook that calls some other resource.
  • If so, does that side effect bypass another resource's policies, i.e using authorize?: false, or not providing the same actor.

Everything above the line can be checked with the provided script. Everything below it, must be checked manually. The script for checking this is available in the "Might I be affected" section.

The script can have false positives, but will not have any false negatives. So if you run the script, and it says "No potential vulnerabilities found", then all you need to do is update ash_postgres.

Patches

This problem has been patched in 2.4.10 of ash_postgres.

Workarounds

You could:

  1. Determine that none of your actions are vulnerable using the script.
  2. Add require_atomic? false to any potentially affected update action
  3. Replace any usage of Ash.update with Ash.bulk_update for an affected action
  4. add an update timestamp to your action.

Might I be affected

This gist provides a script you can run to detect if you are potentially vulnerable.

https://gist.github.com/zachdaniel/e49166b765978c48dfaf998d06df436e

References

Original Report/discovery: https://elixirforum.com/t/empty-update-action-with-policies/66954 Fix commit: https://github.com/ash-project/ash_postgres/commit/1228fcd851f29a68609e236f7d6a2622a4b5c4ba

Affected versions

Hex

PackageVulnerableFixed in
ash_postgres
>= 2.0.0, < 2.4.10
2.4.10

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

ash_postgres Hex → 2.4.10

mix
{:ash_postgres, "~> 2.4.10"} # then: mix deps.update ash_postgres

Severity breakdown

CVSS 3.1 5.3

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

Weakness

CWE-552: Files or Directories Accessible to External Parties

The product makes files or directories accessible to unauthorized actors, even though they should not be.

How to prevent it
  • Implementation, System Configuration, Operation: When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to disable public access.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
EEF-CVE-2026-115627
AshPostgres ignores attribute multitenancy on the join resource when loading many_to_many and through relationships, returning records related through other tenants' rows
Not rated yet Also affects ash_postgres
EEF-CVE-2026-115635
AshPostgres returns another tenant's record for a skipped upsert when return_skipped_upsert? is set
Not rated yet Also affects ash_postgres
EEF-CVE-2026-78699
rename_tenant returns :ok on a failed rename, enabling cross-tenant access in AshPostgres
Not rated yet Also affects ash_postgres
CVE-2026-21589
This is a vulnerability in Bitbucket Data Center, Confluence Data Center, Jira Service Management Data Center, Jira Software Data Center, Bamboo Data Center.
Critical Known exploited Same weakness, CWE-552
GHSA-6cr4-ccf3-x7h4
MCP Atlassian: Arbitrary file read via confluence_upload_attachment allows exfiltration of server credentials
High Same weakness, CWE-552
GHSA-4wwp-f6gw-6qm5
SiYuan: TLS Private Keys Readable via getFile (Incomplete Blocklist)
High Same weakness, CWE-552
GHSA-gxcp-jjxh-rwp4
Grafana: SQL Expressions Read File From Disk
Medium Same weakness, CWE-552
GHSA-p58c-q354-6c4f
pgAdmin 4 contains local file inclusion (LFI) and server-side request forgery (SSRF) vulnerabilities
Medium Same weakness, CWE-552
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor