Sep 25, 2026·5 min read·18 visits
The Elixir Ash framework failed to check the 'public?' flag on action arguments when processing parameters with string keys or executing atomic updates, allowing unauthorized users to modify private parameters.
A parameter injection vulnerability exists in the Ash framework for Elixir, where untrusted string-keyed maps can bypass the 'public?: false' restriction on action arguments. An attacker can leverage this bypass to inject and overwrite private arguments, resulting in unauthorized data modification or privilege escalation depending on the target application's design.
The Ash framework is an Elixir resource-oriented application development library. Within Ash, developers can define action arguments and specify access constraints using the 'public?: false' attribute. This design ensures that certain parameters remain private, intended only for internal, trusted server-side operations (such as assigning authorization attributes or system metadata).
When constructing changeset objects from user inputs, the Ash framework is designed to sanitize external maps and discard parameters matching these private argument declarations. This establishes a security boundary separating untrusted HTTP parameter inputs from high-integrity internal variables.
However, a critical validation gap in the parameter-casting engine breaks this safety guarantee. By exploiting inconsistencies in the framework's internal argument lookup helpers, remote attackers can bypass these filtering boundaries. This results in an improperly controlled modification of dynamically-determined object attributes (CWE-915), also known as mass assignment or parameter pollution.
The core flaw stems from how Ash's internal parameter-processing engine resolves action arguments from incoming maps. The framework handles input maps containing either atom-keyed data (typically generated internally) or string-keyed data (typically parsed from JSON or URL-encoded web forms).
During regular changeset evaluation (such as executing 'for_create/3', 'for_update/3', or 'for_destroy/3' actions), parameter lookup is routed through the 'get_action_argument/2' helper function in 'lib/ash/changeset/changeset.ex'. While the atom-keyed lookup clause validated the 'public?' state of the target argument, the clause processing string-keyed inputs simply checked for string equivalence. It did not verify whether the matched argument was public.
In addition, the atomic and bulk update execution paths (such as 'fully_atomic_changeset/4') relied on the 'has_argument?/2' helper function. Prior to remediation, both the atom-keyed and string-keyed clauses in this function entirely omitted the 'public?' verification check. Consequently, any parameter matching a private argument would be accepted and applied during atomic execution, regardless of the key format.
The vulnerability was resolved by introducing strict public-visibility filters within all lookup paths inside 'lib/ash/changeset/changeset.ex'. The official patch ensures that 'public?' checks are consistently applied before returning any matched argument.
Below is the relevant portion of the codebase demonstrating the vulnerable structure and the corresponding structural changes implemented in the fix:
@@ -3520,15 +3520,15 @@ defmodule Ash.Changeset do
end
defp get_action_argument(action, name) when is_binary(name) do
- Enum.find(action.arguments, &(to_string(&1.name) == name))
+ Enum.find(action.arguments, &(&1.public? && to_string(&1.name) == name))
end
defp has_argument?(action, name) when is_atom(name) do
- Enum.any?(action.arguments, &(&1.name == name))
+ Enum.any?(action.arguments, &(&1.public? && &1.name == name))
end
defp has_argument?(action, name) when is_binary(name) do
- Enum.any?(action.arguments, &(to_string(&1.name) == name))
+ Enum.any?(action.arguments, &(&1.public? && to_string(&1.name) == name))
end
defp validate_attributes_accepted(changeset, %{accept: nil}), do: changesetBy adding the '&1.public?' validation to 'get_action_argument/2' and 'has_argument?/2', the lookup function returns nil when processing untrusted inputs that target private properties. The framework then safely discards or rejects the parameter as non-existent.
To exploit this vulnerability, an attacker must identify an Ash action that exposes public parameters alongside at least one private argument ('public?: false' or legacy 'private?: true') which controls security-critical behavior. Typical targets include fields that define tenant constraints, target ownership, or execution state.
Consider an application that uses a private argument to dictate the security context of a profile update. The developer sets up an update action where a private argument ':acting_user_id' is expected to be programmatically set by a router or controller plug. If policies rely on this private argument to authorize the modification, the logic becomes compromised.
An attacker sends an HTTP request with string-keyed fields containing the parameter they wish to overwrite. Because the web server parses incoming JSON payloads as string-keyed maps (e.g., %{"acting_user_id" => "victim_id"}), the vulnerable Ash engine maps the input to the private argument. The engine bypasses the public visibility check, binds the attacker's value, and runs the action with elevated or spoofed parameters.
This vulnerability has been assigned a CVSS v4.0 Base Score of 5.9 (Medium). The vector string indicates that while the local complexity and execution context limit direct remote code execution out-of-the-box, the impact on integrity is high (VI:H) when the vulnerability is successfully exploited.
In applications that use private arguments to enforce data isolation, tenant constraints, or authorization context, exploitation allows users to perform actions on behalf of other entities. This can lead to unauthorized data disclosure, unauthorized modification of sensitive configuration records, or a complete bypass of application-level access controls.
The overall impact depends heavily on the specific domain logic. If private arguments are not used to make security-critical decisions or enforce access control boundaries, the real-world impact may be limited to localized data corruption.
The primary remediation for this vulnerability is upgrading the 'ash' dependency to version 3.29.3 or later. This release permanently patches the parameter resolution functions and enforces proper visibility checks across both atomic and standard execution flows.
If upgrading is not immediately possible, applications can implement input-filtering middleware. Developers should sanitize incoming maps inside their Phoenix controllers or custom Plugs before passing the parameters to the Ash changeset functions. This is achieved by explicitly deleting keys that match private arguments from the parameters map.
# Temporary Plug or Controller Sanitization
def sanitize_params(conn, _opts) do
params = conn.params
cleaned_params = Map.drop(params, ["acting_user_id", "private_config_flag"])
%{conn | params: cleaned_params}
endSecurity teams should conduct code searches across their repositories to identify instances of 'public?: false' on action definitions to ensure proper awareness of potential exposure vectors.
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
ash ash-project | >= 3.0.0, < 3.29.3 | 3.29.3 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-915 |
| Attack Vector | Local |
| CVSS v4.0 | 5.9 (Medium) |
| EPSS Score | 0.00367 |
| Impact | High Integrity Violation |
| Exploit Status | poc |
| KEV Status | Not Listed |
The product receives input and dynamically determines which attributes of an object should be modified, but it does not properly control which attributes can be modified, allowing unauthorized attackers to modify sensitive attributes.
CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).
CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.
An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.
CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.
CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.
The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.