{"id":"CVE-2026-66296","state":"PUBLISHED","title":"Reflected XSS in oaskit's default HTML error handler","description":"Improper Neutralization of Input During Web Page Generation (XSS) vulnerability in lud oaskit allows reflected cross-site scripting via the default HTML error handler.\n\nOaskit.ErrorHandler.Default.format_reason/4 and Oaskit.ErrorHandler.Default.reason_to_html/1 in lib/oaskit/error_handler/default.ex render request-validation failures as an HTML page whenever the request's Accept header contains html, interpolating request-controlled strings into that page without HTML escaping. The unescaped values are object keys taken from a request body or from an object or deepObject query parameter, which appear in the JSON Schema error's instance path when a schema rejects them (for example under additionalProperties: false), and the raw Content-Type header, reflected in unsupported-media-type errors when it fails to parse.\n\nBecause browsers send Accept: text/html on ordinary top-level navigation, a crafted GET link is sufficient to trigger the error page; no form submission, custom Content-Type, or attacker-controlled script on the victim's side is required. A payload such as filter[</code></h2><script>alert(document.domain)</script>]=x terminates the enclosing markup and the injected script executes in the origin of the application using oaskit, giving it access to that origin's cookies, session, and same-origin responses.\n\nBoth HTML error rendering and the vulnerable handler are enabled by default: Oaskit.Plugs.ValidateRequest defaults :html_errors to true and :error_handler to Oaskit.ErrorHandler.Default, so applications following the documented usage are affected without any opt-in.\n\nThis issue affects oaskit: from 0.1.0 before 0.14.1.","publishedAt":"2026-08-03T19:04:30.556Z","updatedAt":"2026-08-03T19:50:27.860Z","severity":{"score":5.1,"label":"Medium","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","source":"EEF"},"assigner":"EEF","products":["lud oaskit"],"affected":[{"vendor":"lud","product":"oaskit","packageName":"oaskit","packageURL":"pkg:hex/oaskit","defaultStatus":"unaffected","versions":[{"version":"0.1.0","status":"affected","lessThan":"0.14.1","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:lud:oaskit:*:*:*:*:*:elixir:*:*"],"modules":["Elixir.Oaskit.ErrorHandler.Default"],"programFiles":["lib/oaskit/error_handler/default.ex"],"programRoutines":[{"name":"'Elixir.Oaskit.ErrorHandler.Default':format_reason/4"},{"name":"'Elixir.Oaskit.ErrorHandler.Default':reason_to_html/1"}],"repo":"https://github.com/lud/oaskit"},{"vendor":"lud","product":"oaskit","packageName":"lud/oaskit","packageURL":"pkg:github/lud/oaskit","defaultStatus":"unaffected","versions":[{"version":"552de8ca0ff60617bea58bcafa451892d61a161c","status":"affected","lessThan":"b70c6b2eaf0b11bdd0bbb21b8a87dbb3d46918a1","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:lud:oaskit:*:*:*:*:*:elixir:*:*"],"modules":["Elixir.Oaskit.ErrorHandler.Default"],"programFiles":["lib/oaskit/error_handler/default.ex"],"programRoutines":[{"name":"'Elixir.Oaskit.ErrorHandler.Default':format_reason/4"},{"name":"'Elixir.Oaskit.ErrorHandler.Default':reason_to_html/1"}],"repo":"https://github.com/lud/oaskit"}],"references":["https://github.com/lud/oaskit/security/advisories/GHSA-h7xw-x8wr-xpcc","https://cna.erlef.org/cves/CVE-2026-66296.html","https://osv.dev/vulnerability/EEF-CVE-2026-66296","https://github.com/lud/oaskit/commit/b70c6b2eaf0b11bdd0bbb21b8a87dbb3d46918a1"],"weaknesses":["CWE-79"],"ingestedAt":"2026-10-29T20:12:41.951Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/66xxx/CVE-2026-66296.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-66296","state":"PUBLISHED","datePublished":"2026-08-03T19:04:30.556Z","dateUpdated":"2026-08-03T19:50:27.860Z","assignerShortName":"EEF","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateReserved":"2026-07-24T14:10:01.114Z"},"containers":{"cna":{"title":"Reflected XSS in oaskit's default HTML error handler","descriptions":[{"lang":"en","value":"Improper Neutralization of Input During Web Page Generation (XSS) vulnerability in lud oaskit allows reflected cross-site scripting via the default HTML error handler.\n\nOaskit.ErrorHandler.Default.format_reason/4 and Oaskit.ErrorHandler.Default.reason_to_html/1 in lib/oaskit/error_handler/default.ex render request-validation failures as an HTML page whenever the request's Accept header contains html, interpolating request-controlled strings into that page without HTML escaping. The unescaped values are object keys taken from a request body or from an object or deepObject query parameter, which appear in the JSON Schema error's instance path when a schema rejects them (for example under additionalProperties: false), and the raw Content-Type header, reflected in unsupported-media-type errors when it fails to parse.\n\nBecause browsers send Accept: text/html on ordinary top-level navigation, a crafted GET link is sufficient to trigger the error page; no form submission, custom Content-Type, or attacker-controlled script on the victim's side is required. A payload such as filter[</code></h2><script>alert(document.domain)</script>]=x terminates the enclosing markup and the injected script executes in the origin of the application using oaskit, giving it access to that origin's cookies, session, and same-origin responses.\n\nBoth HTML error rendering and the vulnerable handler are enabled by default: Oaskit.Plugs.ValidateRequest defaults :html_errors to true and :error_handler to Oaskit.ErrorHandler.Default, so applications following the documented usage are affected without any opt-in.\n\nThis issue affects oaskit: from 0.1.0 before 0.14.1."}],"affected":[{"vendor":"lud","product":"oaskit","packageName":"oaskit","packageURL":"pkg:hex/oaskit","defaultStatus":"unaffected","versions":[{"version":"0.1.0","status":"affected","lessThan":"0.14.1","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:lud:oaskit:*:*:*:*:*:elixir:*:*"],"modules":["Elixir.Oaskit.ErrorHandler.Default"],"programFiles":["lib/oaskit/error_handler/default.ex"],"programRoutines":[{"name":"'Elixir.Oaskit.ErrorHandler.Default':format_reason/4"},{"name":"'Elixir.Oaskit.ErrorHandler.Default':reason_to_html/1"}],"repo":"https://github.com/lud/oaskit"},{"vendor":"lud","product":"oaskit","packageName":"lud/oaskit","packageURL":"pkg:github/lud/oaskit","defaultStatus":"unaffected","versions":[{"version":"552de8ca0ff60617bea58bcafa451892d61a161c","status":"affected","lessThan":"b70c6b2eaf0b11bdd0bbb21b8a87dbb3d46918a1","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:lud:oaskit:*:*:*:*:*:elixir:*:*"],"modules":["Elixir.Oaskit.ErrorHandler.Default"],"programFiles":["lib/oaskit/error_handler/default.ex"],"programRoutines":[{"name":"'Elixir.Oaskit.ErrorHandler.Default':format_reason/4"},{"name":"'Elixir.Oaskit.ErrorHandler.Default':reason_to_html/1"}],"repo":"https://github.com/lud/oaskit"}],"references":[{"url":"https://github.com/lud/oaskit/security/advisories/GHSA-h7xw-x8wr-xpcc","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-66296.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-66296","tags":["related"]},{"url":"https://github.com/lud/oaskit/commit/b70c6b2eaf0b11bdd0bbb21b8a87dbb3d46918a1","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":5.1,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"LOW","subIntegrityImpact":"LOW","userInteraction":"ACTIVE","valueDensity":"NOT_DEFINED","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-79","description":"CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"EEF","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateUpdated":"2026-08-03T19:04:30.556Z"},"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:lud:oaskit:*:*:*:*:*:elixir:*:*","versionEndExcluding":"0.14.1","versionStartIncluding":"0.1.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Ludovic Dem"},{"lang":"en","type":"remediation developer","value":"Ludovic Dem"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"}],"datePublic":"2026-07-05T00:00:00.000Z","impacts":[{"capecId":"CAPEC-591","descriptions":[{"lang":"en","value":"CAPEC-591 Reflected XSS"}]}],"source":{"discovery":"INTERNAL"},"workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Disable HTML error rendering so that validation failures are returned as JSON only:</p>\n<pre><code class=\"language-elixir\">plug Oaskit.Plugs.ValidateRequest, html_errors: false\n</code></pre>\n<p>This prevents the vulnerable HTML page from being rendered at all, on any oaskit version. Alternatively, configure a custom <code>:error_handler</code> that does not emit HTML built from request-derived values.</p>"},{"base64":false,"type":"text/markdown","value":"Disable HTML error rendering so that validation failures are returned as JSON only:\n\n```elixir\nplug Oaskit.Plugs.ValidateRequest, html_errors: false\n```\n\nThis prevents the vulnerable HTML page from being rendered at all, on any oaskit version. Alternatively, configure a custom `:error_handler` that does not emit HTML built from request-derived values."}],"value":"Disable HTML error rendering so that validation failures are returned as JSON only:\n\nplug Oaskit.Plugs.ValidateRequest, html_errors: false\n\nThis prevents the vulnerable HTML page from being rendered at all, on any oaskit version. Alternatively, configure a custom :error_handler that does not emit HTML built from request-derived values."}]},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/lud/oaskit/security/advisories/GHSA-h7xw-x8wr-xpcc","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-03T19:50:03.665445Z","id":"CVE-2026-66296","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-03T19:50:27.860Z"}}]}}}