CVE-2026-82733: Route handler return value echoed into AshTypescript error response
Generation of Error Message Containing Sensitive Information vulnerability in ash-project ashtypescript allows an unauthenticated attacker to read internal application data from an HTTP 500 response body.
When a typed-controller route handler returns anything other than a %Plug.Conn{}, dispatch/3 in lib/ashtypescript/typedcontroller/requesthandler.ex passes the value to unexpectedreturn/2, which interpolates inspect(value, limit: 50) directly into the response message. The limit option bounds elements per collection rather than the term as a whole, so a handler falling through with a term such as {:error, %User{}} or a changeset serialises its full field set, including hashed passwords, tokens, and tenant identifiers, into the JSON error returned to the caller.
This contradicts the module's own posture elsewhere: the rescue clause gates Exception.message/1 behind AshTypescript.typedcontrollershowraisederrors?/0 and otherwise returns a generic message, while this path is ungated and always echoes.
This issue affects ashtypescript: from 0.15.0 before 0.18.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ash-project ash_typescriptto a version that resolves this vulnerability.Fixed in 0.18.0 - Configuration
Ensure typed-controller route handler return values are limited to %Plug.Conn{} so dispatch/3 does not pass unexpected values into unexpected_return/2, which interpolates inspect(value, limit: 50) into the HTTP 500 response body.
ash_typescript typed-controller route handlers handler return value (unexpected_return echo behavior) = Return only %Plug.Conn{}
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Applications using ash_typescript versions 0.15.0 through versions before 0.18.0 are affected when they expose typed-controller routes. The vulnerable response path can be reached without authentication.
What must occur for sensitive data to be disclosed?
A typed-controller route handler must return a value other than a %Plug.Conn{}, such as an error tuple containing a user record or a changeset. That unexpected return is inspected and included in the HTTP 500 JSON response.
Does the setting that hides raised exception messages prevent this disclosure?
No. The unexpected-return path is not gated by AshTypescript.typed_controller_show_raised_errors?/0 and always echoes the inspected handler return value.
How can I determine whether data may already be exposed?
Review typed-controller handlers for paths that can fall through or return non-%Plug.Conn{} values, especially errors containing records or changesets. Inspect HTTP 500 JSON responses from those routes for serialized internal fields such as password hashes, tokens, or tenant identifiers.