<?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/"><channel><title>Library-Vulnerability - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/library-vulnerability/</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>Fri, 19 Jun 2026 19:56:18 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/library-vulnerability/feed.xml" rel="self" type="application/rss+xml"/><item><title>Oj: Use-After-Free in Oj::Doc Iterators via Reentrant Close</title><link>https://feed.craftedsignal.io/briefs/2026-06-oj-use-after-free/</link><pubDate>Fri, 19 Jun 2026 19:56:18 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-06-oj-use-after-free/</guid><description>A heap use-after-free vulnerability (CVE-2026-54897) exists in `Oj::Doc` iterators (`each_value`, `each_child`, `each_leaf`) in the `oj` Ruby gem, allowing an attacker to cause application crashes or unpredictable behavior when a Ruby block yielded during iteration reentrantly calls `doc.close` or `d.close`.</description><content:encoded><![CDATA[<p>A critical heap use-after-free vulnerability, identified as CVE-2026-54897, affects the <code>Oj::Doc</code> iterators within the <code>oj</code> Ruby gem. Specifically, the <code>each_value</code>, <code>each_child</code>, and <code>each_leaf</code> methods are vulnerable. The issue arises when a Ruby block, executed during the iteration process, makes a reentrant call to <code>doc.close</code> or <code>d.close</code> on the document or one of its child nodes. This premature closing operation frees the associated heap memory while the underlying C iterator in <code>ext/oj/fast.c</code> is still active. Upon returning from the Ruby block, the C code attempts to access memory that has already been deallocated, leading to a use-after-free condition. This vulnerability, present in all <code>oj</code> gem versions utilizing <code>ext/oj/fast.c</code> (confirmed up to v3.17.1), can be triggered from pure Ruby code and results in application instability, crashes, or potential arbitrary code execution. Organizations running Ruby applications that parse JSON via the <code>oj</code> gem are at risk.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>A Ruby application integrates and uses the <code>oj</code> gem for JSON data processing.</li>
<li>The application opens a JSON document for parsing using the <code>Oj::Doc.open</code> method.</li>
<li>The application initiates an iteration over the document's elements using a vulnerable iterator method such as <code>each_value</code>, <code>each_child</code>, or <code>each_leaf</code>, providing a Ruby block for processing.</li>
<li>During the execution of the yielded Ruby block, a call is inadvertently made to <code>doc.close</code> or <code>d.close</code> on the <code>Oj::Doc</code> instance or one of its child nodes.</li>
<li>This <code>close</code> operation triggers the <code>ruby_sized_xfree</code> function within the <code>ext/oj/fast.c</code> source, leading to the premature deallocation of the underlying heap memory buffer associated with the <code>Oj::Doc</code> object.</li>
<li>Control returns from the Ruby block to the original C iterator function in <code>ext/oj/fast.c</code> (e.g., <code>doc_each_child</code>).</li>
<li>The C iterator attempts to access or dereference pointers (like <code>cur-&gt;next</code>) that point to the heap memory region which was previously freed in step 5.</li>
<li>This access to deallocated memory results in a use-after-free condition, manifesting as application crashes, segmentation faults, or unpredictable program behavior.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The primary impact of CVE-2026-54897 is application instability and denial-of-service via crashing. Applications utilizing the vulnerable <code>oj</code> gem can be forced to terminate unexpectedly, leading to service disruption. Depending on the memory layout and the specific memory contents at the time of the use-after-free, this vulnerability could potentially be exploited for arbitrary code execution, though this has not been specifically detailed in the advisory. This could compromise the integrity and confidentiality of data processed by the Ruby application. Any Ruby application that handles untrusted JSON input and uses the vulnerable <code>oj</code> gem iterations is at risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>oj</code> gem to version 3.17.2 or later immediately to patch CVE-2026-54897.</li>
<li>Review application code for instances where <code>doc.close</code> or <code>d.close</code> might be called reentrantly within <code>Oj::Doc</code> iterator blocks, as described in the overview.</li>
<li>Deploy the <code>Detects Ruby Process Access Violation (Windows)</code> Sigma rule to monitor for unusual crashes in Ruby applications.</li>
<li>Deploy the <code>Detects Ruby Process Segmentation Fault (Linux)</code> Sigma rule to monitor for crashes in Ruby applications on Linux systems.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>ruby</category><category>use-after-free</category><category>library-vulnerability</category><category>dos</category></item><item><title>undici Library Vulnerable to Cross-Origin Request Routing via SOCKS5 Proxy Reuse (CVE-2026-6734)</title><link>https://feed.craftedsignal.io/briefs/2026-06-undici-socks5-proxy-vulnerability/</link><pubDate>Fri, 19 Jun 2026 14:27:57 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-06-undici-socks5-proxy-vulnerability/</guid><description>The undici library, when using `Socks5ProxyAgent`, is vulnerable to cross-origin request routing if a single connection pool is reused across different origins, potentially misdirecting requests and credentials, trusting responses from the wrong origin, and silently downgrading HTTPS requests to HTTP (CVE-2026-6734).</description><content:encoded><![CDATA[<p>The <code>undici</code> Node.js HTTP/1.1 client library contains a high-severity vulnerability, identified as CVE-2026-6734, impacting its <code>Socks5ProxyAgent</code> component. This flaw, introduced in <code>undici</code> version 7.23.0 and affecting all versions up to 8.1.0, allows for cross-origin request routing. When an application uses <code>Socks5ProxyAgent</code> (either directly or via <code>setGlobalDispatcher</code>) and makes requests to multiple distinct origins, the library incorrectly reuses a single SOCKS5 connection pool without verifying that the pool's established origin matches the intended destination of subsequent requests. This misrouting can lead to sensitive data exposure, such as credentials, being sent to unintended destinations, and can cause HTTPS requests to be silently downgraded to HTTP, undermining security. This vulnerability is critical for applications that interact with various services through a shared SOCKS5 proxy agent.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An application initializes and configures <code>undici</code> to use a <code>Socks5ProxyAgent</code> for outgoing network requests, either globally via <code>setGlobalDispatcher</code> or locally.</li>
<li>The application makes its first request to an <code>origin_A</code> (e.g., <code>malicious-domain.com</code>) through the configured <code>Socks5ProxyAgent</code>.</li>
<li><code>undici</code> establishes a connection pool to <code>origin_A</code> via the SOCKS5 proxy, associating this pool with the first requested origin.</li>
<li>Subsequently, the application attempts to make a request to a legitimate <code>origin_B</code> (e.g., <code>secure-service.com</code>) using the <em>same</em> <code>Socks5ProxyAgent</code> instance.</li>
<li>Due to the vulnerability, <code>undici</code> reuses the existing connection pool (which was established for <code>origin_A</code>) for the request to <code>origin_B</code>, without validating the target origin.</li>
<li>As a result, sensitive request data, including credentials, intended for <code>origin_B</code> is misdirected and sent to <code>origin_A</code> through the established SOCKS5 proxy connection.</li>
<li>The application may then receive and trust responses from <code>origin_A</code>, mistakenly believing they originated from <code>origin_B</code>, leading to data corruption or further compromise.</li>
<li>Furthermore, if <code>origin_A</code> supports HTTP and the connection was established as such, HTTPS requests intended for <code>origin_B</code> can be silently downgraded to HTTP, compromising encryption and integrity.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The primary impact of this vulnerability is the unintended exposure of sensitive data and potential compromise of application integrity. Applications that utilize <code>Socks5ProxyAgent</code> and interact with multiple origins are at risk. Credentials and request bodies intended for one origin can be misdirected to another, allowing an attacker to intercept or manipulate data. This can lead to unauthorized access, data breaches, and service disruption. Additionally, the silent downgrade of HTTPS requests to HTTP strips away crucial transport layer security, making communications vulnerable to eavesdropping and tampering. There is no specific victim count or sector information available, but any Node.js application using vulnerable versions of <code>undici</code> in the described configuration is affected.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Immediately upgrade <code>npm/undici</code> to version <code>v7.28.0</code> or <code>v8.2.0</code> or later to apply the official patches for CVE-2026-6734.</li>
<li>If immediate upgrade is not possible, implement the recommended workarounds by using a separate <code>Socks5ProxyAgent</code> instance per origin for <code>undici</code> or avoid using <code>Socks5ProxyAgent</code> with multiple origins.</li>
<li>Deploy the provided Sigma rules to detect anomalous network traffic from <code>node.exe</code> processes that might indicate misrouted requests, specifically observing for connections to private IP ranges or unexpected HTTP traffic to external hosts.</li>
<li>Enable comprehensive network connection logging for <code>node.exe</code> processes on all affected operating systems to improve visibility into potential exploitation attempts.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>library-vulnerability</category><category>cross-origin-request</category><category>data-leakage</category><category>nodejs</category></item></channel></rss>