{"answers":{"affected":"2 open source packages ship an affected version, including ash_postgres.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-49756 exists.","fix":"Upgrade ash_postgres to 2.4.10 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2024-49756 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-49756 exists.\n\nAffected packages and fixed versions:\n- ash_postgres (Hex): affected from 2.0.0; fixed in 2.4.10\n- ash_postgres (Hex): affected from 2.0.0; fixed in 2.4.10\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-49756/ (Markdown: https://insights.sbomify.com/CVE-2024-49756/index.md)","id":"CVE-2024-49756","markdown":"https://insights.sbomify.com/CVE-2024-49756/index.md","name":"CVE-2024-49756","record":{"aliases":["GHSA-hf59-7rwq-785m"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"Elixir data layer library","requires_auth":"none","summary":"Attackers can bypass authorization policies to trigger unintended side effects in specific AshPostgres update actions.","user_interaction":"not_required","vuln_class":"missing_authorization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-552","name":"Files or Directories Accessible to External Parties"}],"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.\n\nTo 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.\n\nThis 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.","ecosystems":["Hex"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"AshPostgres empty, atomic, non-bulk actions, policy bypass for side-effects vulnerability.","id":"CVE-2024-49756","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Hex","product":null,"products":[],"type":"missing_authorization","year":"2024"},"n_packages":2,"n_references":4,"next":{"headline":"Zitadel User Registration Bypass Vulnerability","id":"CVE-2024-49757"},"packages":[{"ecosystem":"Hex","fixed":["2.4.10"],"introduced":["2.0.0"],"last_affected":[],"package":"ash_postgres","purl":null,"source":"GHSA-hf59-7rwq-785m"},{"ecosystem":"Hex","fixed":["2.4.10"],"introduced":["2.0.0"],"last_affected":[],"package":"ash_postgres","purl":"pkg:hex/ash_postgres","source":"GHSA-hf59-7rwq-785m"}],"prev":{"headline":"Duende IdentityServer has insufficient validation of DPoP cnf claim in Local APIs","id":"CVE-2024-49755"},"products":["ash_postgres"],"published":"2024-10-23","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-10-24","vendors":["ash-project"]},"summary":"Attackers can bypass authorization policies to trigger unintended side effects in specific AshPostgres update actions.","url":"https://insights.sbomify.com/CVE-2024-49756/"}