<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Kin-Openapi (&lt; 0.148.0) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/kin-openapi--0.148.0/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 15 Oct 2026 22:23:51 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/kin-openapi--0.148.0/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>Uncontrolled Recursion DoS in kin-openapi</title><link>https://feed.craftedsignal.io/briefs/2026-10-kin-openapi-recursion-dos/</link><pubDate>Thu, 15 Oct 2026 22:23:51 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-10-kin-openapi-recursion-dos/</guid><description>The kin-openapi library lacks cycle detection during runtime schema validation, allowing attackers to trigger an unrecoverable Go runtime stack overflow that terminates the entire host process.</description><content:encoded><![CDATA[<p>The kin-openapi library (versions prior to 0.149.0) contains a critical flaw in its runtime schema validation logic. While the library's spec-loader and <code>Schema.validate()</code> method implement cycle detection to handle circular references in OpenAPI schemas, the runtime validators <code>VisitJSON</code> (used for response validation) and <code>decodeValue</code> (used for request parameter decoding) lack these protections.</p>
<p>When a circular combinator chain (such as <code>allOf</code>, <code>anyOf</code>, or <code>oneOf</code>) is encountered during request or response processing, the library enters an infinite recursion loop. In Go, this eventually exhausts the goroutine stack, triggering a fatal <code>runtime: goroutine stack exceeds ... limit</code> error. Because this is a fatal runtime error rather than a panic, it cannot be intercepted by <code>recover()</code> blocks in <code>net/http</code> handlers. Consequently, any request triggering this path causes the entire application process to crash, resulting in a total denial-of-service for all clients sharing that process. This affects any application using kin-openapi for request/response validation, whether the circular schema is provided by a malicious actor or exists as a latent bug in a legitimate API specification.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies an application endpoint utilizing <code>kin-openapi</code> for request or response validation.</li>
<li>Attacker crafts a malicious OpenAPI specification, or leverages an existing one, containing a circular combinator reference (e.g., a <code>Schema</code> object with an <code>allOf</code> field pointing back to itself).</li>
<li>The target application loads the malicious specification into memory via the <code>kin-openapi</code> loader, which treats the circularity as a valid data structure.</li>
<li>The application receives a legitimate HTTP request routed to an endpoint governed by the circular schema definition.</li>
<li>The library's <code>openapi3filter</code> or <code>VisitJSON</code> component processes the input against the circular combinator chain.</li>
<li>The lack of stack-based cycle detection causes the recursion to continue indefinitely.</li>
<li>The Go runtime triggers a fatal stack overflow error.</li>
<li>The entire application process terminates, resulting in a successful denial-of-service.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The vulnerability results in an unrecoverable, process-wide denial-of-service. Because the Go runtime error is fatal, all concurrent connections served by the same process are immediately dropped. The threat is particularly severe for API gateways, mock servers, or any infrastructure that dynamically loads or validates OpenAPI specifications from user-supplied inputs. Even in deployments using static, trusted specifications, the presence of a circular reference leads to a persistent, triggered crash upon any interaction with the affected endpoint.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Update <code>kin-openapi</code> to version 0.149.0 or later, which implements mandatory cycle detection in both <code>VisitJSON</code> and <code>decodeValue</code> paths.</li>
<li>Implement strict validation for any OpenAPI specifications loaded from untrusted or external sources before they are used for runtime validation.</li>
<li>In environments where immediate patching is not possible, implement an upstream WAF rule to scan for and block YAML/JSON inputs containing recursive <code>allOf</code>, <code>anyOf</code>, or <code>oneOf</code> structures.</li>
<li>Deploy monitoring to identify and alert on <code>fatal error: stack overflow</code> entries in application log files, which signal active exploitation or the presence of a broken schema.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">threat</category><category>denial-of-service</category><category>vulnerability</category><category>openapi</category><category>go</category><category>authentication-bypass</category><category>path-confusion</category><category>web-application-vulnerability</category></item></channel></rss>