Skip to content
Heist/ feed
Back to feed
Medium

Declared argument constraints not enforced on AshTypescript typed controller routes

Type: advisorySources: OSV

Improper Input Validation vulnerability in ash-project ash_typescript allows a remote attacker to submit argument values outside a declared allowlist or bound on typed-controller routes. AshTypescript.TypedController.RequestHandler in lib/ash_typescript/typed_controller/request_handler.ex calls Ash.Type.cast_input/3 and treats an {:ok, cast} result as fully validated. In Ash these are separate steps: cast_input/3 only coerces the term, while every constraint declared on the argument is applied by Ash.Type.apply_constraints/3, which this path never calls. Constraints such as one_of, max_length, min and max, and match are therefore inert, so a value outside a declared allowlist is accepted and passed to the route handler. Codegen renders the same constraints into the generated TypeScript types, so an allowlist appears enforced to a TypeScript caller while any other HTTP client ignores it. Empty-string to nil normalization also lives in apply_constraints, so the allow_nil?: false check accepts "" for a required argument. Where a constraint gates a role, a status, or a sort direction, this becomes a privilege or state-machine bypass. This issue affects ash_typescript: from 0.15.0 before 0.18.0.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-82732
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 09:56 UTC · Revision 1

Source evidence

Declared argument constraints not enforced on AshTypescript typed controller routes

core-osv · Original source

Published 1 Sept 2026, 02:09 UTC

Improper Input Validation vulnerability in ash-project ash_typescript allows a remote attacker to submit argument values outside a declared allowlist or bound on typed-controller routes. AshTypescript.TypedController.RequestHandler in lib/ash_typescript/typed_controller/request_handler.ex calls Ash.Type.cast_input/3 and treats an {:ok, cast} result as fully validated. In Ash these are separate steps: cast_input/3 only coerces the term, while every constraint declared on the argument is applied by Ash.Type.apply_constraints/3, which this path never calls. Constraints such as one_of, max_length, min and max, and match are therefore inert, so a value outside a declared allowlist is accepted and passed to the route handler. Codegen renders the same constraints into the generated TypeScript types, so an allowlist appears enforced to a TypeScript caller while any other HTTP client ignores it. Empty-string to nil normalization also lives in apply_constraints, so the allow_nil?: false check accepts "" for a required argument. Where a constraint gates a role, a status, or a sort direction, this becomes a privilege or state-machine bypass. This issue affects ash_typescript: from 0.15.0 before 0.18.0.

osv:CVE-2026-82732
Complete source record
{
  "id": "60c7ea65b13199f14dc929b54679e80ce87353cbe190ca4d8ff4fe672d78d757",
  "url": "https://osv.dev/vulnerability/CVE-2026-82732",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Declared argument constraints not enforced on AshTypescript typed controller routes",
    "summary": "Improper Input Validation vulnerability in ash-project ash_typescript allows a remote attacker to submit argument values outside a declared allowlist or bound on typed-controller routes. AshTypescript.TypedController.RequestHandler in lib/ash_typescript/typed_controller/request_handler.ex calls Ash.Type.cast_input/3 and treats an {:ok, cast} result as fully validated. In Ash these are separate steps: cast_input/3 only coerces the term, while every constraint declared on the argument is applied by Ash.Type.apply_constraints/3, which this path never calls. Constraints such as one_of, max_length, min and max, and match are therefore inert, so a value outside a declared allowlist is accepted and passed to the route handler. Codegen renders the same constraints into the generated TypeScript types, so an allowlist appears enforced to a TypeScript caller while any other HTTP client ignores it. Empty-string to nil normalization also lives in apply_constraints, so the allow_nil?: false check accepts \"\" for a required argument. Where a constraint gates a role, a status, or a sort direction, this becomes a privilege or state-machine bypass. This issue affects ash_typescript: from 0.15.0 before 0.18.0.",
    "evidence": "osv:CVE-2026-82732",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-82732",
      "aliases": [
        "CVE-2026-82732",
        "EEF-CVE-2026-82732",
        "GHSA-f7fq-hwq6-jhvv"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/ash-project/ash_typescript",
              "type": "GIT",
              "events": [
                {
                  "introduced": "546a15e1a2d7dbf1df2d5a6ee4404bc3da87852e"
                },
                {
                  "fixed": "21ab6f1229a4dccdb56bc37ed437d9672a0c4a4e"
                },
                {
                  "introduced": "fb4cc367b85b68d90b99be692dcbbbfc248c1adb"
                },
                {
                  "fixed": "808e4b17ee821a8dac98bda5bf01da0fe1b69d41"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "546a15e1a2d7dbf1df2d5a6ee4404bc3da87852e"
                      },
                      {
                        "fixed": "21ab6f1229a4dccdb56bc37ed437d9672a0c4a4e"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "introduced": "0.15.0"
                      },
                      {
                        "fixed": "0.18.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "fixed": "21ab6f1229a4dccdb56bc37ed437d9672a0c4a4e"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.15.0",
            "v0.15.3",
            "v0.15.2",
            "v0.15.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-82732.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:27.830258499Z",
      "provider": "osv",
      "references": [
        "https://cna.erlef.org/cves/CVE-2026-82732.html",
        "https://github.com",
        "https://osv.dev/vulnerability/EEF-CVE-2026-82732",
        "https://repo.hex.pm",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/82xxx/CVE-2026-82732.json",
        "https://github.com/ash-project/ash_typescript/security/advisories/GHSA-f7fq-hwq6-jhvv",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-82732",
        "https://github.com/ash-project/ash_typescript/commit/21ab6f1229a4dccdb56bc37ed437d9672a0c4a4e",
        "https://github.com/ash-project/ash_typescript"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-20"
        ],
        "cna_assigner": "EEF",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/82xxx/CVE-2026-82732.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-82732",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 494354,
  "published_at": "2026-09-01T02:09:15.07+00:00"
}