<?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>Ruby — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/ruby/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Sat, 25 Apr 2026 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/ruby/feed.xml" rel="self" type="application/rss+xml"/><item><title>ERB Deserialization Bypass via def_module/def_method/def_class</title><link>https://feed.craftedsignal.io/briefs/2026-04-erb-deserialization/</link><pubDate>Sat, 25 Apr 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-erb-deserialization/</guid><description>A deserialization vulnerability exists in Ruby ERB versions before 4.0.3.1, version 4.0.4, ERB versions 5.0.0 before 6.0.1.1, and ERB versions 6.0.2 before 6.0.4. The `@_init` instance variable guard in `ERB#result` and `ERB#run` can be bypassed via `ERB#def_module`, `ERB#def_method`, and `ERB#def_class`, allowing arbitrary code execution when an ERB object is reconstructed via `Marshal.load` on untrusted data.</description><content:encoded><![CDATA[<p>Ruby versions before ERB 2.2.0 implemented an <code>@_init</code> instance variable guard in <code>ERB#result</code> and <code>ERB#run</code> to prevent code execution upon deserialization via <code>Marshal.load</code>. This guard is intended to block execution when an ERB object is reconstructed from untrusted data. However, the methods <code>ERB#def_method</code>, <code>ERB#def_module</code>, and <code>ERB#def_class</code> were not given the same protection, creating a bypass. An attacker capable of triggering <code>Marshal.load</code> on untrusted data in a Ruby application with the <code>erb</code> gem loaded can exploit <code>ERB#def_module</code> (using its zero-argument, default-parameter form) as a code execution sink. This bypass impacts Ruby on Rails applications that import untrusted serialized data, Ruby tools employing <code>Marshal.load</code> for caching or IPC, and legacy Rails applications (pre-7.0) utilizing Marshal for cookie session serialization. This bypass renders the <code>@_init</code> mitigation ineffective across all ERB versions from 2.2.0 through 6.0.3. Combined with the DeprecatedInstanceVariableProxy gadget (present in all ActiveSupport versions through 7.2.3), this enables a universal RCE gadget chain for Ruby 3.2+ applications using Rails. The vulnerability is identified as CVE-2026-41316.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker crafts a malicious Ruby object containing an <code>ERB</code> instance and/or an <code>ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy</code> instance.</li>
<li>The <code>ERB</code> instance has its <code>@src</code> instance variable set to a string containing malicious code with the &ldquo;end\nsystem(&lsquo;id&rsquo;)\ndef x&rdquo; payload.</li>
<li>The vulnerable application calls <code>Marshal.load</code> on the crafted object, triggering deserialization.</li>
<li>During deserialization, the <code>DeprecatedInstanceVariableProxy</code> is instantiated (if used), which then invokes the <code>ERB#def_module</code> method via <code>method_missing</code>.</li>
<li>The <code>ERB#def_module</code> method calls <code>ERB#def_method</code> without checking the <code>@_init</code> guard.</li>
<li>Inside <code>ERB#def_method</code>, the malicious code in <code>@src</code> is wrapped in a method definition and evaluated via <code>module_eval</code>.</li>
<li>The &ldquo;end\nsystem(&lsquo;id&rsquo;)\ndef x&rdquo; payload causes the <code>system('id')</code> command to execute during the <code>module_eval</code> call, bypassing the intended deserialization protection.</li>
<li>The attacker achieves arbitrary code execution on the target system, gaining the ability to perform malicious actions.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows an attacker to execute arbitrary code on the target system. This affects Ruby applications, including Ruby on Rails, which use <code>Marshal.load</code> on untrusted data. Specific impact includes potential compromise of web servers and the ability to read sensitive files, modify data, or install malware. Vulnerable applications include those using <code>Marshal.load</code> for caching, data import, or IPC, and legacy Rails applications (pre-7.0) using Marshal for cookie session serialization. This bypass renders the @_init mitigation ineffective across all ERB versions from 2.2.0 through 6.0.3.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade your erb gem to version 4.0.3.1, 4.0.4.1, 6.0.1.1, or 6.0.4 to patch the vulnerability as described in the &ldquo;Patches&rdquo; section.</li>
<li>Avoid using <code>Marshal.load</code> on untrusted data, as it is inherently unsafe. Consider using alternative serialization formats like JSON or YAML.</li>
<li>Deploy the &ldquo;Detect ERB def_module Code Execution via Deserialization&rdquo; Sigma rule to detect exploitation attempts.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>deserialization</category><category>rce</category><category>ruby</category><category>rails</category></item><item><title>bsv-sdk and bsv-wallet Credential Forgery Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-04-bsv-credential-forgery/</link><pubDate>Thu, 09 Apr 2026 20:28:10 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-bsv-credential-forgery/</guid><description>The bsv-sdk and bsv-wallet packages are vulnerable to credential forgery because the `acquire_certificate` function persists certificate records to storage without verifying the certifier's signature, allowing attackers to forge identity certificates.</description><content:encoded><![CDATA[<p>The <code>bsv-sdk</code> and <code>bsv-wallet</code> Ruby gems are vulnerable to credential forgery due to a signature verification bypass in the <code>acquire_certificate</code> function. This function, present in both gems, persists certificate records to storage without properly verifying the certifier&rsquo;s signature. An attacker can exploit this vulnerability through two acquisition paths: by directly supplying certificate fields (direct path) or by controlling a certifier endpoint (issuance path). This allows the attacker to forge identity certificates that are then treated as authentic by other functions like <code>list_certificates</code> and <code>prove_certificate</code>. The vulnerability affects <code>bsv-sdk</code> versions &gt;= 0.3.1 and &lt; 0.8.2, and <code>bsv-wallet</code> versions &gt;= 0.1.2 and &lt; 0.3.4. This vulnerability was identified during a cross-SDK compliance review conducted on 2026-04-08.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker gains access to a system that uses either the <code>bsv-sdk</code> or <code>bsv-wallet</code> Ruby gem.</li>
<li>The attacker invokes the <code>acquire_certificate</code> function with <code>acquisition_protocol: 'direct'</code>.</li>
<li>The attacker supplies arbitrary certificate fields, including a forged <code>signature</code>, a <code>certifier</code>, <code>serial_number</code>, and <code>revocation_outpoint</code>.</li>
<li>Alternatively, the attacker invokes the <code>acquire_certificate</code> function with <code>acquisition_protocol: 'issuance'</code> and specifies a malicious certifier URL they control.</li>
<li>The vulnerable <code>acquire_certificate</code> function persists the attacker-supplied certificate data to storage without verifying the certifier&rsquo;s signature.</li>
<li>The attacker or a downstream process invokes <code>list_certificates</code> or <code>prove_certificate</code> to retrieve the forged certificate.</li>
<li>The application trusts the forged certificate as authentic, leading to credential forgery and potential unauthorized access or privilege escalation.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to forge identity certificates attributed to arbitrary certifier identities. This can lead to credential forgery, where the attacker can assert false attributes about a subject. Applications relying on the wallet&rsquo;s certificate store for identity attributes, such as KYC assertions or role claims, become vulnerable to credential forgery. This is a credential-forgery primitive, not merely a spec divergence from BRC-52.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to <code>bsv-sdk &gt;= 0.8.2</code> or <code>bsv-wallet &gt;= 0.3.4</code> to patch the vulnerability. These versions implement signature verification using <code>BSV::Wallet::CertificateSignature</code> and raise <code>BSV::Wallet::CertificateSignature::InvalidError</code> for invalid certificates.</li>
<li>If upgrading is not immediately possible, do not expose <code>acquire_certificate</code> (either acquisition protocol) to untrusted callers, as described in the Workarounds section of this brief.</li>
<li>If upgrading is not immediately possible, treat any record returned by <code>list_certificates</code> / <code>prove_certificate</code> as unverified and perform an out-of-band BRC-52 verification against the certifier&rsquo;s public key before acting on it.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>credential-forgery</category><category>ruby</category><category>bsv-sdk</category><category>bsv-wallet</category></item><item><title>BSV Ruby SDK Improper ARC Response Handling</title><link>https://feed.craftedsignal.io/briefs/2024-01-bsv-ruby-sdk-vuln/</link><pubDate>Thu, 09 Apr 2026 18:17:03 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-bsv-ruby-sdk-vuln/</guid><description>BSV Ruby SDK versions before 0.8.2 improperly handle ARC responses, treating certain failure statuses as successful broadcasts, potentially tricking applications into trusting unaccepted transactions; version 0.8.2 resolves this vulnerability.</description><content:encoded><![CDATA[<p>The BSV Ruby SDK, a tool for interacting with the BSV blockchain, contains a vulnerability in versions prior to 0.8.2. Specifically, the <code>BSV::Network::ARC</code> component&rsquo;s failure detection mechanism is flawed. It only recognizes <code>REJECTED</code> and <code>DOUBLE_SPEND_ATTEMPTED</code> ARC responses as failures. Responses with <code>txStatus</code> values like <code>INVALID</code>, <code>MALFORMED</code>, <code>MINED_IN_STALE_BLOCK</code>, or any <code>ORPHAN</code>-containing string in <code>extraInfo</code> or <code>txStatus</code> are incorrectly treated as successful broadcasts. This can lead applications that rely on successful broadcast confirmations to trust transactions that were never actually accepted by the BSV network. The vulnerability is identified as CVE-2026-40069 and is patched in version 0.8.2 of the SDK. This affects any application using the vulnerable SDK to interact with the BSV blockchain where transaction confirmation is critical for subsequent actions.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a transaction designed to fail under specific conditions on the BSV network (e.g., invalid format, conflicts with existing transactions).</li>
<li>The attacker uses an application built with a vulnerable BSV Ruby SDK (versions &lt; 0.8.2) to broadcast the malicious transaction.</li>
<li>The BSV network responds with an ARC response indicating a failure status, such as <code>INVALID</code>, <code>MALFORMED</code>, <code>MINED_IN_STALE_BLOCK</code>, or a status containing <code>ORPHAN</code>.</li>
<li>The vulnerable <code>BSV::Network::ARC</code> component in the SDK incorrectly interprets the failure response as a successful broadcast due to inadequate error handling.</li>
<li>The application, relying on the SDK&rsquo;s flawed confirmation, proceeds with actions dependent on the transaction&rsquo;s supposed success.</li>
<li>These actions could include updating local state, triggering further transactions, or providing access to resources based on the false confirmation.</li>
<li>The attacker benefits from the application&rsquo;s misinterpretation, potentially gaining unauthorized access or manipulating the application&rsquo;s state.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2026-40069 allows attackers to deceive applications using vulnerable BSV Ruby SDK versions into believing that a transaction has been successfully broadcast to the BSV blockchain when it has not. This can lead to incorrect application state, unauthorized actions, or other security breaches depending on the application&rsquo;s logic. While the exact number of affected applications isn&rsquo;t specified, any application relying on transaction confirmation from the BSV Ruby SDK prior to version 0.8.2 is potentially vulnerable. This could impact financial applications, supply chain management systems, or any other application using the BSV blockchain for critical operations.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade all instances of the BSV Ruby SDK to version 0.8.2 or later to remediate CVE-2026-40069.</li>
<li>Implement additional transaction verification mechanisms independent of the BSV Ruby SDK in applications where transaction confirmation is critical.</li>
<li>Deploy the Sigma rule &ldquo;Detect BSV Ruby SDK ARC Response Errors&rdquo; to identify potentially vulnerable applications based on network traffic patterns.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>bsv</category><category>ruby</category><category>blockchain</category><category>vulnerability</category></item><item><title>Rack::Static Information Disclosure Vulnerability (CVE-2026-34785)</title><link>https://feed.craftedsignal.io/briefs/2026-04-rack-static-disclosure/</link><pubDate>Thu, 02 Apr 2026 17:16:24 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-rack-static-disclosure/</guid><description>Rack versions prior to 2.2.23, 3.1.21, and 3.2.6 are vulnerable to information disclosure due to improper static file serving via a prefix matching issue in Rack::Static.</description><content:encoded><![CDATA[<p>Rack, a modular Ruby web server interface, is susceptible to an information disclosure vulnerability in versions prior to 2.2.23, 3.1.21, and 3.2.6. The flaw resides in the Rack::Static middleware component, which uses a simple string prefix check to determine if a request should be served as a static file. When configured with URL prefixes, such as &ldquo;/css&rdquo;, Rack::Static incorrectly matches any request path starting with &ldquo;/css&rdquo;, potentially serving unintended files like &ldquo;/css-config.env&rdquo; or &ldquo;/css-backup.sql&rdquo;. This allows unauthorized access to sensitive files located under the static root directory. This vulnerability, identified as CVE-2026-34785, can lead to the disclosure of configuration files, database backups, and other sensitive information. The vulnerability has been patched in Rack versions 2.2.23, 3.1.21, and 3.2.6.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker identifies a Rack-based web application using a vulnerable version of Rack (prior to 2.2.23, 3.1.21, or 3.2.6).</li>
<li>The attacker identifies a static file directory configured in the Rack application, for example using a path prefix like &ldquo;/css&rdquo;.</li>
<li>The attacker crafts a malicious request targeting a sensitive file within the static directory, such as &ldquo;/css-config.env&rdquo; or &ldquo;/css-backup.sql&rdquo;, that shares the configured prefix but is not intended to be served publicly.</li>
<li>The Rack::Static middleware incorrectly matches the malicious request due to the simple string prefix check.</li>
<li>The web server serves the unintended file to the attacker.</li>
<li>The attacker gains access to sensitive information contained in the served file.</li>
<li>The attacker leverages the disclosed information to further compromise the application or infrastructure.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability (CVE-2026-34785) can lead to the disclosure of sensitive information, including configuration files, database backups, and other critical data. The impact severity is dependent on the nature of the exposed files. For example, exposure of database credentials could result in a full compromise of the application&rsquo;s data. Organizations using vulnerable Rack versions are susceptible to information breaches if they rely on Rack::Static to serve files.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade Rack to version 2.2.23, 3.1.21, or 3.2.6 or later to patch CVE-2026-34785.</li>
<li>Review Rack::Static configurations to ensure appropriate restrictions are in place for serving static files.</li>
<li>Deploy the Sigma rule &ldquo;Detect Suspicious Rack Static File Access&rdquo; to identify attempts to access files with similar prefixes.</li>
<li>Monitor web server logs (category: webserver) for unusual requests with file extensions such as <code>.env</code>, <code>.sql</code>, <code>.bak</code> that fall under static directories (e.g., /css, /js, /img).</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>rack</category><category>information-disclosure</category><category>CVE-2026-34785</category><category>ruby</category><category>webserver</category></item><item><title>Avo Framework Broken Access Control Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-avo-broken-access-control/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-03-avo-broken-access-control/</guid><description>Avo framework version 3.x contains a critical Broken Access Control vulnerability in the ActionsController. Due to insecure action lookup logic, an authenticated user can execute any Action class on any resource, even if the action is not registered for that specific resource. This leads to Privilege Escalation and unauthorized data manipulation across the entire application. Version 3.31.2 remediates this issue.</description><content:encoded><![CDATA[<p>A critical broken access control vulnerability exists within the Avo framework, specifically affecting version 3.x. This vulnerability resides in the <code>ActionsController</code> and stems from an insecure action lookup mechanism. An authenticated user, regardless of their privilege level, can execute any Action class (descendants of <code>Avo::BaseAction</code>) on any resource within the application. This occurs because the system fails to validate whether the requested action is legitimately registered or permitted for the resource context specified in the request. The absence of this verification allows for the circumvention of intended resource-action mappings. Successful exploitation leads to privilege escalation, unauthorized data manipulation, and potential compromise of the application&rsquo;s integrity. It is recommended to upgrade to version 3.31.2 or later, which addresses this vulnerability.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker authenticates to the Avo admin panel with low-level privileges.</li>
<li>The attacker identifies a sensitive action class, such as <code>Avo::Actions::ToggleAdmin</code>.</li>
<li>The attacker identifies a target record ID, such as a user ID they wish to manipulate.</li>
<li>The attacker crafts a POST request to a resource endpoint where the target action is NOT registered (e.g., <code>/admin/resources/posts/actions</code>).</li>
<li>The POST request includes a payload containing the <code>action_id</code> parameter set to the sensitive action class (<code>Avo::Actions::ToggleAdmin</code>).</li>
<li>The POST request also includes a <code>fields[avo_resource_ids]</code> parameter set to the target record ID.</li>
<li>Due to the insecure action lookup in <code>Avo::ActionsController</code>, the server executes the <code>ToggleAdmin</code> action on the specified user ID.</li>
<li>The attacker&rsquo;s privileges are escalated, or unauthorized data manipulation occurs due to the successful execution of the unintended action.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The exploitation of this broken access control vulnerability can have severe consequences. A successful attack can lead to privilege escalation, allowing attackers to gain administrative control over the application. Unauthorized operations can be performed, leading to data breaches or data manipulation. Sensitive actions designed for restricted resources can be triggered against any record ID, potentially compromising the integrity and confidentiality of data. The impact includes unauthorized deletion, archival, or updates to records, causing reputational damage and potential financial losses.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to Avo version 3.31.2 or later, which contains the necessary fix to restrict action lookup to registered actions for the current resource context.</li>
<li>Deploy the Sigma rule <code>Detect Avo Unauthorized Action Execution</code> to monitor for attempts to execute actions on resources where they are not registered.</li>
<li>Review and audit existing Avo action registrations to ensure that actions are appropriately mapped to resources within the application.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>broken-access-control</category><category>privilege-escalation</category><category>ruby</category></item></channel></rss>