CVE-2024-49756

CVE-2024-49756 is a medium-severity security vulnerability in ash_postgres (erlang), affecting versions >= 2.0.0, < 2.4.10. It is fixed in 2.4.10.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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

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.

CVE-2024-49756 has a CVSS score of 5.3 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.4.10); upgrading removes the vulnerable code path.

Affected versions

ash_postgres (>= 2.0.0, < 2.4.10)

Security releases

ash_postgres → 2.4.10 (erlang)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

This problem has been patched in 2.4.10 of ash_postgres.

Frequently Asked Questions

  1. What is CVE-2024-49756? CVE-2024-49756 is a medium-severity security vulnerability in ash_postgres (erlang), affecting versions >= 2.0.0, < 2.4.10. It is fixed in 2.4.10.
  2. How severe is CVE-2024-49756? CVE-2024-49756 has a CVSS score of 5.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of ash_postgres are affected by CVE-2024-49756? ash_postgres (erlang) versions >= 2.0.0, < 2.4.10 is affected.
  4. Is there a fix for CVE-2024-49756? Yes. CVE-2024-49756 is fixed in 2.4.10. Upgrade to this version or later.
  5. Is CVE-2024-49756 exploitable, and should I be worried? Whether CVE-2024-49756 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2024-49756 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2024-49756? Upgrade ash_postgres to 2.4.10 or later.

Stop the waste.
Protect your environment with Kodem.