mirror of
https://github.com/rustsec/advisory-db.git
synced 2026-11-30 17:37:51 -06:00
1712 lines
72 KiB
XML
1712 lines
72 KiB
XML
<?xml version="1.0"?>
|
|
<feed xmlns="http://www.w3.org/2005/Atom"><title>RustSec Advisories</title><id>https://rustsec.org/feed.xml</id><updated>2024-09-01T12:00:00+00:00</updated><author><name>RustSec</name></author><icon>https://rustsec.org/favicon.ico</icon><link href="https://rustsec.org/feed.xml" rel="self" type="application/atom+xml"/><link href="https://rustsec.org/" rel="alternate" type="text/html"/><subtitle xml:lang="en">Security advisories filed against Rust crates</subtitle><entry><title>RUSTSEC-2024-0367: Vulnerability in gix-path</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0367.html</id><updated>2024-09-01T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0367.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0367: Vulnerability in gix-path"/><published>2024-09-01T12:00:00+00:00</published><summary xml:lang="en">gix-path uses local config across repos when it is the highest scope</summary><content xml:lang="en" type="html"> <article>
|
|
|
|
<span class="floating-menu">
|
|
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/gix-path/RUSTSEC-2024-0367.md">History</a> ⋅
|
|
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/gix-path/RUSTSEC-2024-0367.md">Edit</a> ⋅
|
|
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0367">JSON (OSV)</a>
|
|
</span>
|
|
|
|
|
|
<header>
|
|
<h1>
|
|
|
|
RUSTSEC-2024-0367
|
|
|
|
</h1>
|
|
<span class="subtitle"><p>gix-path uses local config across repos when it is the highest scope</p>
|
|
</span>
|
|
</header>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt id="reported">Reported</dt>
|
|
<dd>
|
|
<time datetime="2024-08-31">
|
|
August 31, 2024
|
|
</time>
|
|
</dd>
|
|
|
|
<dt id="issued">Issued</dt>
|
|
<dd>
|
|
<time datetime="2024-09-01">
|
|
September 1, 2024
|
|
</time>
|
|
|
|
</dd>
|
|
|
|
<dt id="package">Package</dt>
|
|
<dd>
|
|
|
|
|
|
<a href="/packages/gix-path.html">gix-path</a>
|
|
(<a href="https://crates.io/crates/gix-path">crates.io</a>)
|
|
|
|
|
|
</dd>
|
|
|
|
<dt id="type">Type</dt>
|
|
<dd>
|
|
|
|
Vulnerability
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
<dt id="keywords">Keywords</dt>
|
|
<dd>
|
|
|
|
<a href="/keywords/configuration-failure.html">#configuration-failure</a>
|
|
|
|
<a href="/keywords/information-leak.html">#information-leak</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt id="aliases">Aliases</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<a href="https://github.com/advisories/GHSA-v26r-4c9c-h3j6">GHSA-v26r-4c9c-h3j6</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt id="details">References</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://github.com/Byron/gitoxide/security/advisories/GHSA-v26r-4c9c-h3j6">
|
|
https://github.com/Byron/gitoxide/security/advisories/GHSA-v26r-4c9c-h3j6
|
|
</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="cvss_score">CVSS Score</dt>
|
|
<dd>2.5 <span class="tag low">
|
|
LOW
|
|
</span></dd>
|
|
|
|
<dt id="cvss_details">CVSS Details</dt>
|
|
<dd>
|
|
<dl>
|
|
|
|
<dt>Attack vector</dt><dd>Local</dd>
|
|
|
|
|
|
|
|
<dt>Attack complexity</dt><dd>High</d>
|
|
|
|
|
|
|
|
<dt>Privileges required</dt><dd>None</dd>
|
|
|
|
|
|
|
|
<dt>User interaction</dt><dd>Required</dd>
|
|
|
|
|
|
|
|
<dt>Scope</dt><dd>Unchanged</dd>
|
|
|
|
|
|
|
|
<dt>Confidentiality</dt><dd>Low</dd>
|
|
|
|
|
|
|
|
<dt>Integrity</dt><dd>None</dd>
|
|
|
|
|
|
|
|
<dt>Availability</dt><dd>None</dd>
|
|
|
|
</dl>
|
|
</dd>
|
|
|
|
<dt id="cvss">CVSS Vector</dt>
|
|
<dd><a href="https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N">CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N</a></dd>
|
|
|
|
|
|
|
|
<dt id="patched">Patched</dt>
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
<li><code>&gt;=0.10.10</code></li>
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Affected Functions</dt>
|
|
<dd>Version</dd>
|
|
|
|
<dt><code>gix_path::env::installation_config</code></dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li><code>*</code></li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><code>gix_path::env::installation_config_prefix</code></dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li><code>*</code></li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h3 id="description">Description</h3>
|
|
<h3>Summary</h3>
|
|
<p><code>gix-path</code> executes <code>git</code> to find the path of a configuration file that belongs to the <code>git</code> installation itself, but mistakenly treats the local repository's configuration as system-wide if no higher scoped configuration is found. In rare cases, this causes a less trusted repository to be treated as more trusted, or leaks sensitive information from one repository to another, such as sending credentials to another repository's remote.</p>
|
|
<h3>Details</h3>
|
|
<p>In <code>gix_path::env</code>, the underlying implementation of the <code>installation_config</code> and <code>installation_config_prefix</code> functions calls <code>git config -l --show-origin</code> and parses the first line of the output to extract the path to the configuration file holding the configuration variable of highest <a href="https://git-scm.com/docs/git-config#SCOPES">scope</a>:</p>
|
|
<p>https://github.com/Byron/gitoxide/blob/12251eb052df30105538fa831e641eea557f13d8/gix-path/src/env/git/mod.rs#L91</p>
|
|
<p>https://github.com/Byron/gitoxide/blob/12251eb052df30105538fa831e641eea557f13d8/gix-path/src/env/git/mod.rs#L112</p>
|
|
<p>While the configuration variable of highest scope is not usually in the local scope, there are practical situations where this occurs:</p>
|
|
<ul>
|
|
<li>A configuration file truly associated with the installation is not present on all systems and can occasionally be empty. Likewise, there may be no variables in the global scope.</li>
|
|
<li>Configuration files associated with those higher scopes may be deliberately skipped by setting the <code>GIT_CONFIG_SYSTEM</code> and <code>GIT_CONFIG_GLOBAL</code> environment variables to <code>/dev/null</code> (or to <code>NUL</code> on Windows). This prevents <code>gix-path</code> from finding the path of configuration files for those scopes, while not preventing downstream components such as the function in <code>gix-config</code> from reporting a local path as being associated with the installation.</li>
|
|
<li>The <code>GIT_CONFIG_NOSYSTEM</code> environment variable can be used to disable configuration associated with the installation. (<code>GIT_CONFIG_NOSYSTEM=1</code> is more powerful than <code>GIT_CONFIG_SYSTEM=/dev/null</code> on systems where an additional &quot;unknown&quot; scope is associated with the installation, as occurs on macOS with Apple Git.) This will cause the local scope to be the highest nonempty scope under even more situations, though in practice it is less dangerous because most, though possibly not all, downstream components would disregard the value.</li>
|
|
</ul>
|
|
<p>A user may use either or both of the latter two techniques to turn off an undesired configuration or to create a more replicable environment. Such a user would expect that this results in a more controlled configuration.</p>
|
|
<p>Often, when located inside one repository, a user performs operations on that repository or that are not specific to any repository. In such use, local configuration is typically desired or at least acceptable, and mistaking it as coming from another scope is not typically harmful.</p>
|
|
<p>However, sometimes a user is in one repository and operates on another repository. A major case where this occurs is cloning one repository while located in another. This can be done in an ad-hoc fashion, including when cloning the repository outside of the one we are inside. It may also potentially be automated by an application for purposes such as submodule handling. Two kinds of problems are anticipated:</p>
|
|
<ul>
|
|
<li>A less secure configuration may be set for a specific repository where it is judged acceptable, even though it would not be wanted for other repositories, such as to enable a protocol or set up debugging.</li>
|
|
<li>More likely, a configuration that supplies secrets for use in one repository's remote can be used to send those secrets to another repository's remote.</li>
|
|
</ul>
|
|
<h3>PoC</h3>
|
|
<p>In this example, we send mock <code>Authorization: Basic ...</code> credentials meant for one repository's remote to another remote, by running <code>gix</code> while inside the first repository to clone the second repository.</p>
|
|
<p>These instructions are written for a Unix shell, but they will work in other shells, including in PowerShell on Windows if the method of setting environment variables is adapted and <code>/dev/null</code> is replaced with <code>NUL</code>. This procedure is likely to demonstrate the problem on all systems <em>except</em> macOS. This is due to the high-scoped &quot;unknown&quot; configuration that usually accompanies Apple Git, and reflects that gix-path is in practice much less vulnerable on macOS (though still potentially vulnerable).</p>
|
|
<ol>
|
|
<li>
|
|
<p>Install <a href="https://crates.io/crates/dummyhttp"><code>dummyhttp</code></a> to serve as a local HTTP server for the demonstration.</p>
|
|
</li>
|
|
<li>
|
|
<p>Obtain a build of <code>gitoxide</code> with the <code>max</code> feature set enabled. While this vulnerability affects other builds, this example requires <code>max</code> for <code>http.extraHeader</code> support.</p>
|
|
<p>Running <code>cargo install gitoxide</code> will install such a build though it may build against a patched version of <code>gix-path</code>. Cloning the repository (<a href="https://github.com/Byron/gitoxide/commit/12251eb052df30105538fa831e641eea557f13d8"><code>12251eb</code></a> and earlier are affected) and building with <code>cargo build</code> or <code>cargo install --path .</code> are also sufficient. In contrast, installing from published binaries with <code>binstall</code> or <code>quickinstall</code> does not provide the <code>max</code> feature, as of this writing.</p>
|
|
</li>
|
|
<li>
|
|
<p>Run: <code>dummyhttp -i 127.0.0.1 -c 403 -v</code></p>
|
|
</li>
|
|
<li>
|
|
<p>In a separate terminal, create a new local repository and set up a mock remote and <code>http.extraHeader</code> configuration:</p>
|
|
<pre><code class="language-sh">git init myrepo
|
|
cd myrepo
|
|
git remote add origin http://127.0.0.1:8080/mygit.git
|
|
git config --local http.extraHeader 'Authorization: Basic abcde'
|
|
</code></pre>
|
|
</li>
|
|
<li>
|
|
<p>Make sure the testing setup is working by running <code>gix fetch</code> in the repository and checking that it fails in the expected way. In the terminal where that is run, a message should be shown indicating an HTTP 403 error. The more interesting output is in the terminal where <code>dummyhttp</code> is running, which should look like this:</p>
|
|
<pre><code class="language-text">2024-30-30 03:30:16 127.0.0.1:55689 GET /myrepo.git/info/refs?service=git-upload-pack HTTP/1.1
|
|
┌─Incoming request
|
|
│ GET /myrepo.git/info/refs?service=git-upload-pack HTTP/1.1
|
|
│ Accept: */*
|
|
│ Authorization: Basic abcde
|
|
│ Git-Protocol: version=2
|
|
│ Host: 127.0.0.1:8080
|
|
│ User-Agent: git/oxide-0.42.2
|
|
┌─Outgoing response
|
|
│ HTTP/1.1 403 Forbidden
|
|
│ Content-Length: 9
|
|
│ Content-Type: text/plain; charset=utf-8
|
|
│ Date: Fri, 30 Aug 2024 03:30:16 -0400
|
|
</code></pre>
|
|
<p>Some details may differ, especially dates and times. But <code>Authorization: Basic abcde</code> should be shown.</p>
|
|
</li>
|
|
<li>
|
|
<p>Now, in the terminal where you ran <code>gix fetch</code>, try cloning a separate repository:</p>
|
|
<pre><code class="language-sh">gix clone http://127.0.0.1:8080/other.git
|
|
</code></pre>
|
|
<p>Check the output appended in the terminal where <code>dummyhttp</code> is running. This is to observe that <code>Authorization: Basic abcde</code> was rightly <em>not</em> sent.</p>
|
|
<p>Alternatively, if it <em>does</em> appear, then your system may be in one of the uncommon configurations that is vulnerable without further action.</p>
|
|
</li>
|
|
<li>
|
|
<p>Now rerun that command, but with a modified environment, to cause <code>gix-path</code> to wrongly treat configuration from the local scope as being associated with the <code>git</code> installation:</p>
|
|
<pre><code class="language-sh">env GIT_CONFIG_SYSTEM=/dev/null GIT_CONFIG_GLOBAL=/dev/null gix clone http://127.0.0.1:8080/other.git
|
|
</code></pre>
|
|
<p>Check the output appended in the terminal where <code>dummyhttp</code> is running. Observe that <code>Authorization: Basic abcde</code> was wrongly sent.</p>
|
|
</li>
|
|
</ol>
|
|
<p>While this procedure uses the same remote host for both repositories, this is not a required element. If the second repository had a different, untrusted host, the extra header would still be sent.</p>
|
|
<h3>Impact</h3>
|
|
<p>It is believed to be very difficult to exploit this vulnerability deliberately, due to the need either to anticipate a situation in which higher-scoped configuration variables would be absent, or to arrange for this to happen. Although any operating system may be affected, users running Apple Git on macOS are much less likely to be affected.</p>
|
|
<p>In the example shown above, more secure general practices would avoid it: using a credential manager, or even using <code>http.&lt;url&gt;.extraHeader</code> with as specific a <code>&lt;url&gt;</code> as possible, rather than the more general <code>http.extraHeader</code>. Many scenarios are analogous: if each repository's configuration is as secure as possible for how the repository is used, and secrets are stored securely and separately, then the circumstances under which an unacceptably unsecure configuration is used, or under which a leak of credentials would occur, become unlikely.</p>
|
|
|
|
|
|
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
|
license.
|
|
|
|
|
|
</p>
|
|
</article></content></entry><entry><title>RUSTSEC-2024-0366: Vulnerability in cosmwasm-vm</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0366.html</id><updated>2024-08-27T12:00:00+00:00</updated><category term="denial-of-service"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0366.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0366: Vulnerability in cosmwasm-vm"/><published>2024-08-27T12:00:00+00:00</published><summary xml:lang="en">CWA-2023-004: Excessive number of function parameters in compiled Wasm</summary><content xml:lang="en" type="html"> <article>
|
|
|
|
<span class="floating-menu">
|
|
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/cosmwasm-vm/RUSTSEC-2024-0366.md">History</a> ⋅
|
|
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/cosmwasm-vm/RUSTSEC-2024-0366.md">Edit</a> ⋅
|
|
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0366">JSON (OSV)</a>
|
|
</span>
|
|
|
|
|
|
<header>
|
|
<h1>
|
|
|
|
RUSTSEC-2024-0366
|
|
|
|
</h1>
|
|
<span class="subtitle"><p>CWA-2023-004: Excessive number of function parameters in compiled Wasm</p>
|
|
</span>
|
|
</header>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt id="reported">Reported</dt>
|
|
<dd>
|
|
<time datetime="2024-08-27">
|
|
August 27, 2024
|
|
</time>
|
|
</dd>
|
|
|
|
<dt id="issued">Issued</dt>
|
|
<dd>
|
|
<time datetime="2024-08-27">
|
|
August 27, 2024
|
|
</time>
|
|
|
|
</dd>
|
|
|
|
<dt id="package">Package</dt>
|
|
<dd>
|
|
|
|
|
|
<a href="/packages/cosmwasm-vm.html">cosmwasm-vm</a>
|
|
(<a href="https://crates.io/crates/cosmwasm-vm">crates.io</a>)
|
|
|
|
|
|
</dd>
|
|
|
|
<dt id="type">Type</dt>
|
|
<dd>
|
|
|
|
Vulnerability
|
|
|
|
</dd>
|
|
|
|
|
|
<dt id="categories">Categories</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li><a href="/categories/denial-of-service.html">denial-of-service</a></li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt id="keywords">Keywords</dt>
|
|
<dd>
|
|
|
|
<a href="/keywords/resource-consumption.html">#resource-consumption</a>
|
|
|
|
<a href="/keywords/crash.html">#crash</a>
|
|
|
|
<a href="/keywords/deadlock.html">#deadlock</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="details">References</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2023-004.md">
|
|
https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2023-004.md
|
|
</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="patched">Patched</dt>
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
<li><code>&gt;=1.2.8, &lt;1.3.0</code></li>
|
|
|
|
<li><code>&gt;=1.3.4, &lt;1.4.0</code></li>
|
|
|
|
<li><code>&gt;=1.4.2, &lt;1.5.0</code></li>
|
|
|
|
<li><code>&gt;=1.5.1</code></li>
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h3 id="description">Description</h3>
|
|
<p>A specifically crafted Wasm file can cause the VM to consume excessive amounts of memory when compiling a contract.
|
|
This can lead to high memory usage, slowdowns, potentially a crash and can poison a lock in the VM,
|
|
preventing any further interaction with contracts.</p>
|
|
<p>For more information, see <a href="https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2023-004.md">CWA-2023-004</a>.</p>
|
|
|
|
|
|
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
|
license.
|
|
|
|
|
|
</p>
|
|
</article></content></entry><entry><title>RUSTSEC-2024-0365: Vulnerability in diesel</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0365.html</id><updated>2024-08-23T12:00:00+00:00</updated><category term="format-injection"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0365.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0365: Vulnerability in diesel"/><published>2024-08-23T12:00:00+00:00</published><summary xml:lang="en">Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts</summary><content xml:lang="en" type="html"> <article>
|
|
|
|
<span class="floating-menu">
|
|
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/diesel/RUSTSEC-2024-0365.md">History</a> ⋅
|
|
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/diesel/RUSTSEC-2024-0365.md">Edit</a> ⋅
|
|
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0365">JSON (OSV)</a>
|
|
</span>
|
|
|
|
|
|
<header>
|
|
<h1>
|
|
|
|
RUSTSEC-2024-0365
|
|
|
|
</h1>
|
|
<span class="subtitle"><p>Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts</p>
|
|
</span>
|
|
</header>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt id="reported">Reported</dt>
|
|
<dd>
|
|
<time datetime="2024-08-23">
|
|
August 23, 2024
|
|
</time>
|
|
</dd>
|
|
|
|
<dt id="issued">Issued</dt>
|
|
<dd>
|
|
<time datetime="2024-08-23">
|
|
August 23, 2024
|
|
</time>
|
|
|
|
</dd>
|
|
|
|
<dt id="package">Package</dt>
|
|
<dd>
|
|
|
|
|
|
<a href="/packages/diesel.html">diesel</a>
|
|
(<a href="https://crates.io/crates/diesel">crates.io</a>)
|
|
|
|
|
|
</dd>
|
|
|
|
<dt id="type">Type</dt>
|
|
<dd>
|
|
|
|
Vulnerability
|
|
|
|
</dd>
|
|
|
|
|
|
<dt id="categories">Categories</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li><a href="/categories/format-injection.html">format-injection</a></li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt id="keywords">Keywords</dt>
|
|
<dd>
|
|
|
|
<a href="/keywords/sql.html">#sql</a>
|
|
|
|
<a href="/keywords/injection.html">#injection</a>
|
|
|
|
<a href="/keywords/overflow.html">#overflow</a>
|
|
|
|
<a href="/keywords/truncation.html">#truncation</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="details">References</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://github.com/diesel-rs/diesel/pull/4170">
|
|
https://github.com/diesel-rs/diesel/pull/4170
|
|
</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="patched">Patched</dt>
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
<li><code>&gt;=2.2.3</code></li>
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h3 id="description">Description</h3>
|
|
<p>The following presentation at this year's DEF CON was brought to our attention on the Diesel Gitter Channel:</p>
|
|
<blockquote>
|
|
<p>SQL Injection isn't Dead: Smuggling Queries at the Protocol Level<br />
|
|
<a href="http://web.archive.org/web/20240812130923/https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn&#x27;t%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf">http://web.archive.org/web/20240812130923/https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn't%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf</a><br />
|
|
(Archive link for posterity.)
|
|
Essentially, encoding a value larger than 4GiB can cause the length prefix in the protocol to overflow,
|
|
causing the server to interpret the rest of the string as binary protocol commands or other data.</p>
|
|
</blockquote>
|
|
<p>It appears Diesel <em>does</em> perform truncating casts in a way that could be problematic,
|
|
for example: <a href="https://github.com/diesel-rs/diesel/blob/ae82c4a5a133db65612b7436356f549bfecda1c7/diesel/src/pg/connection/stmt/mod.rs#L36">https://github.com/diesel-rs/diesel/blob/ae82c4a5a133db65612b7436356f549bfecda1c7/diesel/src/pg/connection/stmt/mod.rs#L36</a></p>
|
|
<p>This code has existed essentially since the beginning,
|
|
so it is reasonable to assume that all published versions <code>&lt;= 2.2.2</code> are affected.</p>
|
|
<h2>Mitigation</h2>
|
|
<p>The prefered migration to the outlined problem is to update to a Diesel version newer than 2.2.2, which includes
|
|
fixes for the problem.</p>
|
|
<p>As always, you should make sure your application is validating untrustworthy user input.
|
|
Reject any input over 4 GiB, or any input that could <em>encode</em> to a string longer than 4 GiB.
|
|
Dynamically built queries are also potentially problematic if it pushes the message size over this 4 GiB bound.</p>
|
|
<p>For web application backends, consider adding some middleware that limits the size of request bodies by default.</p>
|
|
<h2>Resolution</h2>
|
|
<p>Diesel now uses <code>#[deny]</code> directives for the following Clippy lints:</p>
|
|
<ul>
|
|
<li><a href="https://rust-lang.github.io/rust-clippy/master/#/cast_possible_truncation"><code>cast_possible_truncation</code></a></li>
|
|
<li><a href="https://rust-lang.github.io/rust-clippy/master/#/cast_possible_wrap"><code>cast_possible_wrap</code></a></li>
|
|
<li><a href="https://rust-lang.github.io/rust-clippy/master/#/cast_sign_loss"><code>cast_sign_loss</code></a></li>
|
|
</ul>
|
|
<p>to prevent casts that will lead to precision loss or other trunctations. Additionally we performed an
|
|
audit of the relevant code.</p>
|
|
<p>A fix is included in the <code>2.2.3</code> release.</p>
|
|
|
|
|
|
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
|
license.
|
|
|
|
|
|
</p>
|
|
</article></content></entry><entry><title>RUSTSEC-2024-0364: Vulnerability in gitoxide-core</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0364.html</id><updated>2024-08-23T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0364.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0364: Vulnerability in gitoxide-core"/><published>2024-08-23T12:00:00+00:00</published><summary xml:lang="en">gitoxide-core does not neutralize special characters for terminals</summary><content xml:lang="en" type="html"> <article>
|
|
|
|
<span class="floating-menu">
|
|
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/gitoxide-core/RUSTSEC-2024-0364.md">History</a> ⋅
|
|
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/gitoxide-core/RUSTSEC-2024-0364.md">Edit</a> ⋅
|
|
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0364">JSON (OSV)</a>
|
|
</span>
|
|
|
|
|
|
<header>
|
|
<h1>
|
|
|
|
RUSTSEC-2024-0364
|
|
|
|
</h1>
|
|
<span class="subtitle"><p>gitoxide-core does not neutralize special characters for terminals</p>
|
|
</span>
|
|
</header>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt id="reported">Reported</dt>
|
|
<dd>
|
|
<time datetime="2024-08-22">
|
|
August 22, 2024
|
|
</time>
|
|
</dd>
|
|
|
|
<dt id="issued">Issued</dt>
|
|
<dd>
|
|
<time datetime="2024-08-23">
|
|
August 23, 2024
|
|
</time>
|
|
|
|
</dd>
|
|
|
|
<dt id="package">Package</dt>
|
|
<dd>
|
|
|
|
|
|
<a href="/packages/gitoxide-core.html">gitoxide-core</a>
|
|
(<a href="https://crates.io/crates/gitoxide-core">crates.io</a>)
|
|
|
|
|
|
</dd>
|
|
|
|
<dt id="type">Type</dt>
|
|
<dd>
|
|
|
|
Vulnerability
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
<dt id="keywords">Keywords</dt>
|
|
<dd>
|
|
|
|
<a href="/keywords/terminal.html">#terminal</a>
|
|
|
|
<a href="/keywords/control-characters.html">#control-characters</a>
|
|
|
|
<a href="/keywords/escape-sequences.html">#escape-sequences</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt id="aliases">Aliases</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-43785">CVE-2024-43785</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="https://github.com/advisories/GHSA-88g2-r9rw-g55h">GHSA-88g2-r9rw-g55h</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt id="details">References</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://github.com/Byron/gitoxide/security/advisories/GHSA-88g2-r9rw-g55h">
|
|
https://github.com/Byron/gitoxide/security/advisories/GHSA-88g2-r9rw-g55h
|
|
</a>
|
|
</li>
|
|
|
|
|
|
<li>
|
|
<a href="https://github.com/advisories/GHSA-88g2-r9rw-g55h">
|
|
https://github.com/advisories/GHSA-88g2-r9rw-g55h
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://nvd.nist.gov/vuln/detail/CVE-2024-43785">
|
|
https://nvd.nist.gov/vuln/detail/CVE-2024-43785
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://github.com/Byron/gitoxide/issues/1534">
|
|
https://github.com/Byron/gitoxide/issues/1534
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="cvss_score">CVSS Score</dt>
|
|
<dd>2.5 <span class="tag low">
|
|
LOW
|
|
</span></dd>
|
|
|
|
<dt id="cvss_details">CVSS Details</dt>
|
|
<dd>
|
|
<dl>
|
|
|
|
<dt>Attack vector</dt><dd>Local</dd>
|
|
|
|
|
|
|
|
<dt>Attack complexity</dt><dd>High</d>
|
|
|
|
|
|
|
|
<dt>Privileges required</dt><dd>None</dd>
|
|
|
|
|
|
|
|
<dt>User interaction</dt><dd>Required</dd>
|
|
|
|
|
|
|
|
<dt>Scope</dt><dd>Unchanged</dd>
|
|
|
|
|
|
|
|
<dt>Confidentiality</dt><dd>None</dd>
|
|
|
|
|
|
|
|
<dt>Integrity</dt><dd>Low</dd>
|
|
|
|
|
|
|
|
<dt>Availability</dt><dd>None</dd>
|
|
|
|
</dl>
|
|
</dd>
|
|
|
|
<dt id="cvss">CVSS Vector</dt>
|
|
<dd><a href="https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N">CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N</a></dd>
|
|
|
|
|
|
|
|
<dt id="patched">Patched</dt>
|
|
<dd>
|
|
|
|
no patched versions
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h3 id="description">Description</h3>
|
|
<h3>Summary</h3>
|
|
<p>The <code>gix</code> and <code>ein</code> commands write pathnames and other metadata literally to terminals, even if they contain characters terminals treat specially, including ANSI escape sequences. This sometimes allows an untrusted repository to misrepresent its contents and to alter or concoct error messages.</p>
|
|
<h3>Details</h3>
|
|
<p><code>gitoxide-core</code>, which provides most underlying functionality of the <code>gix</code> and <code>ein</code> commands, does not neutralize newlines, backspaces, or control characters—including those that form ANSI escape sequences—that appear in a repository's paths, author and committer names, commit messages, or other metadata. Such text may be written as part of the output of a command, as well as appearing in error messages when an operation fails.</p>
|
|
<p>ANSI escape sequences are of particular concern because, when printed to a terminal, they can change colors, including to render subsequent text unreadable; reposition the cursor to write text in a different location, including where text has already been written; clear the terminal; set the terminal title-bar text to arbitrary values; render the terminal temporarily unusable; and other such operations.</p>
|
|
<p>The effect is mostly an annoyance. But the author of a malicious repository who can predict how information from the repository may be accessed can cause files in the repository to be concealed or otherwise misrepresented, as well as rewrite all or part of error messages, or mimic error messages convincingly by repositioning the cursor and writing colored text.</p>
|
|
<h3>PoC</h3>
|
|
<p>On a Unix-like system in a POSIX-compatible shell, run:</p>
|
|
<pre><code class="language-sh">git init misleading-path
|
|
cd misleading-path
|
|
touch &quot;$(printf '\033]0;Boo!\007\033[2K\r\033[91mError: Repository is corrupted. Run \033[96mEVIL_COMMAND\033[91m to attempt recovery.\033[0m')&quot;
|
|
git add .
|
|
git commit -m 'Initial commit'
|
|
</code></pre>
|
|
<p>In the repository—or, if desired, in a clone of it, to show that this is exploitable by getting a user to clone an untrusted repository—run this command, which outputs entries in a three-column form showing type, hash, and filename:</p>
|
|
<pre><code class="language-sh">gix tree entries
|
|
</code></pre>
|
|
<p>Although the output is of that form, it does not appear to be. Instead, the output in a terminal looks like this, colorized to appear to be an error message, with <code>EVIL_COMMAND</code> in another color, and with no other text:</p>
|
|
<pre><code class="language-text">Error: Repository is corrupted. Run EVIL_COMMAND to attempt recovery.
|
|
</code></pre>
|
|
<p>In some terminals, a beep or other sound will be made. In most terminals, the title bar text will be changed to <code>Boo!</code>, though in some shells this may be immediately undone when printing the prompt. These elements are included to showcase the abilities of ANSI escape sequences, but they are not usually themselves threats.</p>
|
|
<p>To see what is actually produced, <code>gix tree entries</code> can be piped to a command that displays special characters symbolically, such as <code>less</code> or <code>cat -v</code> if available.</p>
|
|
<pre><code class="language-text">BLOB e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 ESC]0;Boo!^GESC[2K^MESC[91mError: Repository is corrupted. Run ESC[96mEVIL_COMMANDESC[91m to attempt recovery.ESC[0m
|
|
</code></pre>
|
|
<p>That shows the effect on <code>gix tree entries</code>, but various other commands are also affected, and the escape sequences and other special characters can also appear in non-path metadata, such as in the <code>user.name</code> used to create a commit.</p>
|
|
<h3>Impact</h3>
|
|
<p>For users who do not clone or operate in clones of untrusted repositories, there is no impact.</p>
|
|
<p>Windows is much less affected than Unix-like systems due to limitations on what characters can appear in filenames, and because traditionally Windows terminals do not support as many ANSI escape sequences.</p>
|
|
<p>Because different <code>gix</code> and <code>ein</code> commands display different data in different formats, the author of a malicious repository must guess how it will be used, which complicates crafting truly convincing output, though it may be possible to craft a repository where <code>gix clone</code> fails to clone it but produces a misleading message.</p>
|
|
<p>Although this is mainly exploitable on systems <em>other</em> than Windows, in the ability to produce misleading output this superficially resembles <a href="https://github.com/advisories/GHSA-49jc-r788-3fc9">CVE-2024-35197</a>. But this is much more limited, because:</p>
|
|
<ul>
|
|
<li>The misleading output can only be made to go where the application is already sending output. Redirection is not defeated, and devices to access cannot be chosen by the attacker.</li>
|
|
<li>The misleading output can only be take place <em>when</em> the application is already producing output. This limitation complicates the production of believable messages.</li>
|
|
<li>Only terminals are affected. Even if a standard stream is redirected to another file or device, these special characters would not have a special effect, unless echoed later without sanitization.</li>
|
|
<li>Reading and blocking cannot be performed.</li>
|
|
<li>Applications other than the gitoxide <code>gix</code> and <code>ein</code> executables are unaffected. The exception is if another application uses <code>gitoxide-core</code>. But this is explicitly discouraged in the <code>gitoxide-core</code> documentation and is believed to be rare.</li>
|
|
</ul>
|
|
|
|
|
|
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
|
license.
|
|
|
|
|
|
</p>
|
|
</article></content></entry><entry><title>RUSTSEC-2024-0363: Vulnerability in sqlx</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0363.html</id><updated>2024-08-24T12:00:00+00:00</updated><category term="format-injection"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0363.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0363: Vulnerability in sqlx"/><published>2024-08-16T12:00:00+00:00</published><summary xml:lang="en">Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts</summary><content xml:lang="en" type="html"> <article>
|
|
|
|
<span class="floating-menu">
|
|
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/sqlx/RUSTSEC-2024-0363.md">History</a> ⋅
|
|
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/sqlx/RUSTSEC-2024-0363.md">Edit</a> ⋅
|
|
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0363">JSON (OSV)</a>
|
|
</span>
|
|
|
|
|
|
<header>
|
|
<h1>
|
|
|
|
RUSTSEC-2024-0363
|
|
|
|
</h1>
|
|
<span class="subtitle"><p>Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts</p>
|
|
</span>
|
|
</header>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt id="reported">Reported</dt>
|
|
<dd>
|
|
<time datetime="2024-08-15">
|
|
August 15, 2024
|
|
</time>
|
|
</dd>
|
|
|
|
<dt id="issued">Issued</dt>
|
|
<dd>
|
|
<time datetime="2024-08-16">
|
|
August 16, 2024
|
|
</time>
|
|
|
|
<time datetime="2024-08-24">
|
|
(last modified: August 24, 2024)
|
|
</time>
|
|
|
|
</dd>
|
|
|
|
<dt id="package">Package</dt>
|
|
<dd>
|
|
|
|
|
|
<a href="/packages/sqlx.html">sqlx</a>
|
|
(<a href="https://crates.io/crates/sqlx">crates.io</a>)
|
|
|
|
|
|
</dd>
|
|
|
|
<dt id="type">Type</dt>
|
|
<dd>
|
|
|
|
Vulnerability
|
|
|
|
</dd>
|
|
|
|
|
|
<dt id="categories">Categories</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li><a href="/categories/format-injection.html">format-injection</a></li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt id="keywords">Keywords</dt>
|
|
<dd>
|
|
|
|
<a href="/keywords/sql.html">#sql</a>
|
|
|
|
<a href="/keywords/injection.html">#injection</a>
|
|
|
|
<a href="/keywords/overflow.html">#overflow</a>
|
|
|
|
<a href="/keywords/truncation.html">#truncation</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="details">References</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://github.com/launchbadge/sqlx/issues/3440">
|
|
https://github.com/launchbadge/sqlx/issues/3440
|
|
</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="patched">Patched</dt>
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
<li><code>&gt;=0.8.1</code></li>
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h3 id="description">Description</h3>
|
|
<p>The following presentation at this year's DEF CON was brought to our attention on the SQLx Discord:</p>
|
|
<blockquote>
|
|
<p>SQL Injection isn't Dead: Smuggling Queries at the Protocol Level<br />
|
|
<a href="http://web.archive.org/web/20240812130923/https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn&#x27;t%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf">http://web.archive.org/web/20240812130923/https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn't%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf</a><br />
|
|
(Archive link for posterity.)</p>
|
|
</blockquote>
|
|
<p>Essentially, encoding a value larger than 4GiB can cause the length prefix in the protocol to overflow,
|
|
causing the server to interpret the rest of the string as binary protocol commands or other data.</p>
|
|
<p>It appears SQLx <em>does</em> perform truncating casts in a way that could be problematic,
|
|
for example: <a href="https://github.com/launchbadge/sqlx/blob/6f2905695b9606b5f51b40ce10af63ac9e696bb8/sqlx-postgres/src/arguments.rs#L163">https://github.com/launchbadge/sqlx/blob/6f2905695b9606b5f51b40ce10af63ac9e696bb8/sqlx-postgres/src/arguments.rs#L163</a></p>
|
|
<p>This code has existed essentially since the beginning,
|
|
so it is reasonable to assume that all published versions <code>&lt;= 0.8.0</code> are affected.</p>
|
|
<h2>Mitigation</h2>
|
|
<p>As always, you should make sure your application is validating untrustworthy user input.
|
|
Reject any input over 4 GiB, or any input that could <em>encode</em> to a string longer than 4 GiB.
|
|
Dynamically built queries are also potentially problematic if it pushes the message size over this 4 GiB bound.</p>
|
|
<p><a href="https://docs.rs/sqlx/latest/sqlx/trait.Encode.html#method.size_hint"><code>Encode::size_hint()</code></a>
|
|
can be used for sanity checks, but do not assume that the size returned is accurate.
|
|
For example, the <code>Json&lt;T&gt;</code> and <code>Text&lt;T&gt;</code> adapters have no reasonable way to predict or estimate the final encoded size,
|
|
so they just return <code>size_of::&lt;T&gt;()</code> instead.</p>
|
|
<p>For web application backends, consider adding some middleware that limits the size of request bodies by default.</p>
|
|
<h2>Resolution</h2>
|
|
<p><code>sqlx 0.8.1</code> has been released with the fix: <a href="https://github.com/launchbadge/sqlx/blob/main/CHANGELOG.md#081---2024-08-23">https://github.com/launchbadge/sqlx/blob/main/CHANGELOG.md#081---2024-08-23</a></p>
|
|
<p>Postgres users are advised to upgrade ASAP as a possible exploit has been demonstrated:
|
|
<a href="https://github.com/launchbadge/sqlx/issues/3440#issuecomment-2307956901">https://github.com/launchbadge/sqlx/issues/3440#issuecomment-2307956901</a></p>
|
|
<p>MySQL and SQLite do not <em>appear</em> to be exploitable, but upgrading is recommended nonetheless.</p>
|
|
|
|
|
|
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
|
license.
|
|
|
|
|
|
</p>
|
|
</article></content></entry><entry><title>RUSTSEC-2024-0362: Vulnerability in alloy-json-abi</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0362.html</id><updated>2024-08-15T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0362.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0362: Vulnerability in alloy-json-abi"/><published>2024-08-15T12:00:00+00:00</published><summary xml:lang="en">Stack overflow when parsing specially crafted JSON ABI strings</summary><content xml:lang="en" type="html"> <article>
|
|
|
|
<span class="floating-menu">
|
|
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/alloy-json-abi/RUSTSEC-2024-0362.md">History</a> ⋅
|
|
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/alloy-json-abi/RUSTSEC-2024-0362.md">Edit</a> ⋅
|
|
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0362">JSON (OSV)</a>
|
|
</span>
|
|
|
|
|
|
<header>
|
|
<h1>
|
|
|
|
RUSTSEC-2024-0362
|
|
|
|
</h1>
|
|
<span class="subtitle"><p>Stack overflow when parsing specially crafted JSON ABI strings</p>
|
|
</span>
|
|
</header>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt id="reported">Reported</dt>
|
|
<dd>
|
|
<time datetime="2024-07-30">
|
|
July 30, 2024
|
|
</time>
|
|
</dd>
|
|
|
|
<dt id="issued">Issued</dt>
|
|
<dd>
|
|
<time datetime="2024-08-15">
|
|
August 15, 2024
|
|
</time>
|
|
|
|
</dd>
|
|
|
|
<dt id="package">Package</dt>
|
|
<dd>
|
|
|
|
|
|
<a href="/packages/alloy-json-abi.html">alloy-json-abi</a>
|
|
(<a href="https://crates.io/crates/alloy-json-abi">crates.io</a>)
|
|
|
|
|
|
</dd>
|
|
|
|
<dt id="type">Type</dt>
|
|
<dd>
|
|
|
|
Vulnerability
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
<dt id="keywords">Keywords</dt>
|
|
<dd>
|
|
|
|
<a href="/keywords/stack-overflow.html">#stack-overflow</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="details">References</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://github.com/alloy-rs/core/issues/702">
|
|
https://github.com/alloy-rs/core/issues/702
|
|
</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="patched">Patched</dt>
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
<li><code>&gt;=0.7.7</code></li>
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h3 id="description">Description</h3>
|
|
<p>Affected versions of the <code>alloy-json-abi</code> crate did not properly handle parsing of malformatted JSON ABI strings. The <code>JsonAbi::parse</code> method can be tricked into a stack overflow when processing specially crafted input.</p>
|
|
<p>This stack overflow can lead to a crash of the application using this crate, potentially causing a denial of service.</p>
|
|
<p>The flaw was corrected in commit 4790c47.</p>
|
|
|
|
|
|
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
|
license.
|
|
|
|
|
|
</p>
|
|
</article></content></entry><entry><title>RUSTSEC-2024-0361: Vulnerability in cosmwasm-vm</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0361.html</id><updated>2024-08-08T12:00:00+00:00</updated><category term="denial-of-service"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0361.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0361: Vulnerability in cosmwasm-vm"/><published>2024-08-08T12:00:00+00:00</published><summary xml:lang="en">CWA-2024-004: Gas mispricing in cosmwasm-vm</summary><content xml:lang="en" type="html"> <article>
|
|
|
|
<span class="floating-menu">
|
|
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/cosmwasm-vm/RUSTSEC-2024-0361.md">History</a> ⋅
|
|
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/cosmwasm-vm/RUSTSEC-2024-0361.md">Edit</a> ⋅
|
|
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0361">JSON (OSV)</a>
|
|
</span>
|
|
|
|
|
|
<header>
|
|
<h1>
|
|
|
|
RUSTSEC-2024-0361
|
|
|
|
</h1>
|
|
<span class="subtitle"><p>CWA-2024-004: Gas mispricing in cosmwasm-vm</p>
|
|
</span>
|
|
</header>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt id="reported">Reported</dt>
|
|
<dd>
|
|
<time datetime="2024-08-08">
|
|
August 8, 2024
|
|
</time>
|
|
</dd>
|
|
|
|
<dt id="issued">Issued</dt>
|
|
<dd>
|
|
<time datetime="2024-08-08">
|
|
August 8, 2024
|
|
</time>
|
|
|
|
</dd>
|
|
|
|
<dt id="package">Package</dt>
|
|
<dd>
|
|
|
|
|
|
<a href="/packages/cosmwasm-vm.html">cosmwasm-vm</a>
|
|
(<a href="https://crates.io/crates/cosmwasm-vm">crates.io</a>)
|
|
|
|
|
|
</dd>
|
|
|
|
<dt id="type">Type</dt>
|
|
<dd>
|
|
|
|
Vulnerability
|
|
|
|
</dd>
|
|
|
|
|
|
<dt id="categories">Categories</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li><a href="/categories/denial-of-service.html">denial-of-service</a></li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt id="keywords">Keywords</dt>
|
|
<dd>
|
|
|
|
<a href="/keywords/resource-consumption.html">#resource-consumption</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt id="aliases">Aliases</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<a href="https://github.com/advisories/GHSA-rg2q-2jh9-447q">GHSA-rg2q-2jh9-447q</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt id="details">References</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-004.md">
|
|
https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-004.md
|
|
</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="patched">Patched</dt>
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
<li><code>&gt;=1.5.7, &lt;2.0.0</code></li>
|
|
|
|
<li><code>&gt;=2.0.6, &lt;2.1.0</code></li>
|
|
|
|
<li><code>&gt;=2.1.3</code></li>
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h3 id="description">Description</h3>
|
|
<p>Some Wasm operations take significantly more gas than our benchmarks indicated. This can lead to missing the gas target we defined by a factor of ~10x. This means a malicious contract could take 10 times as much time to execute as expected, which can be used to temporarily DoS a chain.</p>
|
|
<p>For more information, see <a href="https://github.com/CosmWasm/advisories/blob/main/CWAs/CWA-2024-004.md">CWA-2024-004</a>.</p>
|
|
|
|
|
|
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
|
license.
|
|
|
|
|
|
</p>
|
|
</article></content></entry><entry><title>RUSTSEC-2024-0360: Unsoundness in xmp_toolkit</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0360.html</id><updated>2024-07-26T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0360.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0360: Unsoundness in xmp_toolkit"/><published>2024-07-26T12:00:00+00:00</published><summary xml:lang="en">`XmpFile::close` can trigger UB</summary><content xml:lang="en" type="html"> <article>
|
|
|
|
<span class="floating-menu">
|
|
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/xmp_toolkit/RUSTSEC-2024-0360.md">History</a> ⋅
|
|
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/xmp_toolkit/RUSTSEC-2024-0360.md">Edit</a> ⋅
|
|
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0360">JSON (OSV)</a>
|
|
</span>
|
|
|
|
|
|
<header>
|
|
<h1>
|
|
|
|
RUSTSEC-2024-0360
|
|
|
|
</h1>
|
|
<span class="subtitle"><p><code>XmpFile::close</code> can trigger UB</p>
|
|
</span>
|
|
</header>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt id="reported">Reported</dt>
|
|
<dd>
|
|
<time datetime="2024-07-26">
|
|
July 26, 2024
|
|
</time>
|
|
</dd>
|
|
|
|
<dt id="issued">Issued</dt>
|
|
<dd>
|
|
<time datetime="2024-07-26">
|
|
July 26, 2024
|
|
</time>
|
|
|
|
</dd>
|
|
|
|
<dt id="package">Package</dt>
|
|
<dd>
|
|
|
|
|
|
<a href="/packages/xmp_toolkit.html">xmp_toolkit</a>
|
|
(<a href="https://crates.io/crates/xmp_toolkit">crates.io</a>)
|
|
|
|
|
|
</dd>
|
|
|
|
<dt id="type">Type</dt>
|
|
<dd>
|
|
|
|
<span class="tag info">INFO</span>
|
|
Unsound
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
<dt id="keywords">Keywords</dt>
|
|
<dd>
|
|
|
|
<a href="/keywords/xmp.html">#xmp</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="details">References</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://github.com/adobe/xmp-toolkit-rs/issues/233">
|
|
https://github.com/adobe/xmp-toolkit-rs/issues/233
|
|
</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="patched">Patched</dt>
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
<li><code>&gt;=1.9.0</code></li>
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Affected Functions</dt>
|
|
<dd>Version</dd>
|
|
|
|
<dt><code>xmp_toolkit::XmpFile::close</code></dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li><code>&lt;1.9.0</code></li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h3 id="description">Description</h3>
|
|
<p>Affected versions of the crate failed to catch C++ exceptions raised within the <code>XmpFile::close</code> function. If such an exception occured, it would trigger undefined behavior, typically a process abort.</p>
|
|
<p>This is best demonstrated in <a href="https://github.com/adobe/xmp-toolkit-rs/issues/230">issue #230</a>, where a race condition causes the <code>close</code> call to fail due to file I/O errors.</p>
|
|
<p>This was fixed in <a href="https://github.com/adobe/xmp-toolkit-rs/pull/232">PR #232</a> (released as crate version 1.9.0), which now safely handles the exception.</p>
|
|
<p>For backward compatibility, the existing API ignores the error. A new API <code>XmpFile::try_close</code> was added to allow callers to receive and process the error result.</p>
|
|
<p>Users of all prior versions of <code>xmp_toolkit</code> are encouraged to update to version 1.9.0 to avoid undefined behavior.</p>
|
|
|
|
|
|
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
|
license.
|
|
|
|
|
|
</p>
|
|
</article></content></entry><entry><title>RUSTSEC-2024-0359: Unsoundness in gix-attributes</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0359.html</id><updated>2024-07-25T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0359.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0359: Unsoundness in gix-attributes"/><published>2024-07-25T12:00:00+00:00</published><summary xml:lang="en">The kstring integration in gix-attributes is unsound</summary><content xml:lang="en" type="html"> <article>
|
|
|
|
<span class="floating-menu">
|
|
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/gix-attributes/RUSTSEC-2024-0359.md">History</a> ⋅
|
|
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/gix-attributes/RUSTSEC-2024-0359.md">Edit</a> ⋅
|
|
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0359">JSON (OSV)</a>
|
|
</span>
|
|
|
|
|
|
<header>
|
|
<h1>
|
|
|
|
RUSTSEC-2024-0359
|
|
|
|
</h1>
|
|
<span class="subtitle"><p>The kstring integration in gix-attributes is unsound</p>
|
|
</span>
|
|
</header>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt id="reported">Reported</dt>
|
|
<dd>
|
|
<time datetime="2024-07-24">
|
|
July 24, 2024
|
|
</time>
|
|
</dd>
|
|
|
|
<dt id="issued">Issued</dt>
|
|
<dd>
|
|
<time datetime="2024-07-25">
|
|
July 25, 2024
|
|
</time>
|
|
|
|
</dd>
|
|
|
|
<dt id="package">Package</dt>
|
|
<dd>
|
|
|
|
|
|
<a href="/packages/gix-attributes.html">gix-attributes</a>
|
|
(<a href="https://crates.io/crates/gix-attributes">crates.io</a>)
|
|
|
|
|
|
</dd>
|
|
|
|
<dt id="type">Type</dt>
|
|
<dd>
|
|
|
|
<span class="tag info">INFO</span>
|
|
Unsound
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="details">References</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://github.com/Byron/gitoxide/issues/1460">
|
|
https://github.com/Byron/gitoxide/issues/1460
|
|
</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="patched">Patched</dt>
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
<li><code>&gt;=0.22.3</code></li>
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h3 id="description">Description</h3>
|
|
<p><code>gix-attributes</code> (in <a href="https://github.com/Byron/gitoxide/blob/gix-attributes-v0.22.2/gix-attributes/src/state.rs#L19-L27"><code>state::ValueRef</code></a>) unsafely creates a <code>&amp;str</code> from a <code>&amp;[u8]</code> containing non-UTF8 data, with the justification that so long as nothing reads the <code>&amp;str</code> and relies on it being UTF-8 in the <code>&amp;str</code>, there is no UB:</p>
|
|
<pre><code class="language-rust">// SAFETY: our API makes accessing that value as `str` impossible, so illformed UTF8 is never exposed as such.
|
|
</code></pre>
|
|
<p>The problem is that the non-UTF8 <code>str</code> <strong>is</strong> exposed to outside code: first to the <code>kstring</code> crate itself, which requires UTF-8 in its documentation and may have UB as a consequence of this, but also to <code>serde</code>, where it propagates to e.g. <code>serde_json</code>, <code>serde_yaml</code>, etc., where the same problems occur.</p>
|
|
<p>This is not sound, and it could cause further UB down the line in these places that can view the <code>&amp;str</code>.</p>
|
|
|
|
|
|
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
|
license.
|
|
|
|
|
|
</p>
|
|
</article></content></entry><entry><title>RUSTSEC-2024-0358: Vulnerability in object_store</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0358.html</id><updated>2024-07-23T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0358.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0358: Vulnerability in object_store"/><published>2024-07-23T12:00:00+00:00</published><summary xml:lang="en">Apache Arrow Rust Object Store: AWS WebIdentityToken exposure in log files</summary><content xml:lang="en" type="html"> <article>
|
|
|
|
<span class="floating-menu">
|
|
<a href="https://github.com/RustSec/advisory-db/commits/main/crates/object_store/RUSTSEC-2024-0358.md">History</a> ⋅
|
|
<a href="https://github.com/RustSec/advisory-db/edit/main/crates/object_store/RUSTSEC-2024-0358.md">Edit</a> ⋅
|
|
<a href="https://api.osv.dev/v1/vulns/RUSTSEC-2024-0358">JSON (OSV)</a>
|
|
</span>
|
|
|
|
|
|
<header>
|
|
<h1>
|
|
|
|
RUSTSEC-2024-0358
|
|
|
|
</h1>
|
|
<span class="subtitle"><p>Apache Arrow Rust Object Store: AWS WebIdentityToken exposure in log files</p>
|
|
</span>
|
|
</header>
|
|
|
|
|
|
|
|
<dl>
|
|
<dt id="reported">Reported</dt>
|
|
<dd>
|
|
<time datetime="2024-07-23">
|
|
July 23, 2024
|
|
</time>
|
|
</dd>
|
|
|
|
<dt id="issued">Issued</dt>
|
|
<dd>
|
|
<time datetime="2024-07-23">
|
|
July 23, 2024
|
|
</time>
|
|
|
|
</dd>
|
|
|
|
<dt id="package">Package</dt>
|
|
<dd>
|
|
|
|
|
|
<a href="/packages/object_store.html">object_store</a>
|
|
(<a href="https://crates.io/crates/object_store">crates.io</a>)
|
|
|
|
|
|
</dd>
|
|
|
|
<dt id="type">Type</dt>
|
|
<dd>
|
|
|
|
Vulnerability
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
<dt id="keywords">Keywords</dt>
|
|
<dd>
|
|
|
|
<a href="/keywords/information.html">#information</a>
|
|
|
|
<a href="/keywords/leak.html">#leak</a>
|
|
|
|
<a href="/keywords/aws.html">#aws</a>
|
|
|
|
<a href="/keywords/oidc.html">#oidc</a>
|
|
|
|
<a href="/keywords/logs.html">#logs</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt id="aliases">Aliases</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-41178">CVE-2024-41178</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt id="details">References</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://github.com/apache/arrow-rs/pull/6074">
|
|
https://github.com/apache/arrow-rs/pull/6074
|
|
</a>
|
|
</li>
|
|
|
|
|
|
<li>
|
|
<a href="https://www.openwall.com/lists/oss-security/2024/07/23/3">
|
|
https://www.openwall.com/lists/oss-security/2024/07/23/3
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dt id="cvss_score">CVSS Score</dt>
|
|
<dd>3.8 <span class="tag low">
|
|
LOW
|
|
</span></dd>
|
|
|
|
<dt id="cvss_details">CVSS Details</dt>
|
|
<dd>
|
|
<dl>
|
|
|
|
<dt>Attack vector</dt><dd>Local</dd>
|
|
|
|
|
|
|
|
<dt>Attack complexity</dt><dd>Low</d>
|
|
|
|
|
|
|
|
<dt>Privileges required</dt><dd>Low</dd>
|
|
|
|
|
|
|
|
<dt>User interaction</dt><dd>None</dd>
|
|
|
|
|
|
|
|
<dt>Scope</dt><dd>Changed</dd>
|
|
|
|
|
|
|
|
<dt>Confidentiality</dt><dd>Low</dd>
|
|
|
|
|
|
|
|
<dt>Integrity</dt><dd>None</dd>
|
|
|
|
|
|
|
|
<dt>Availability</dt><dd>None</dd>
|
|
|
|
</dl>
|
|
</dd>
|
|
|
|
<dt id="cvss">CVSS Vector</dt>
|
|
<dd><a href="https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N">CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N</a></dd>
|
|
|
|
|
|
|
|
<dt id="patched">Patched</dt>
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
<li><code>&gt;=0.10.2</code></li>
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
|
|
<dt id="unaffected">Unaffected</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
<li><code>&lt;0.5.0</code></li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h3 id="description">Description</h3>
|
|
<p>Exposure of temporary credentials in logs in Apache Arrow Rust Object Store,
|
|
version 0.10.1 and earlier on all platforms using AWS WebIdentityTokens.</p>
|
|
<p>On certain error conditions, the logs may contain the OIDC token passed to
|
|
<a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html">AssumeRoleWithWebIdentity</a>.
|
|
This allows someone with access to the logs to impersonate that identity,
|
|
including performing their own calls to AssumeRoleWithWebIdentity, until the
|
|
OIDC token expires. Typically OIDC tokens are valid for up to an hour, although
|
|
this will vary depending on the issuer.</p>
|
|
<p>Users are recommended to use a different AWS authentication mechanism, disable
|
|
logging or upgrade to version 0.10.2, which fixes this issue.</p>
|
|
<h2>Details</h2>
|
|
<p>When using AWS WebIdentityTokens with the <code>object_store</code> crate, in the event of
|
|
a failure and automatic retry, the underlying <code>reqwest</code> error, including the
|
|
full URL with the credentials, potentially in the parameters, is written to the
|
|
logs.</p>
|
|
<p>Thanks to Paul Hatcherian for reporting this vulnerability</p>
|
|
|
|
|
|
<p id="license" class="license">Advisory available under <a href="https://spdx.org/licenses/CC0-1.0.html">CC0-1.0</a>
|
|
license.
|
|
|
|
|
|
</p>
|
|
</article></content></entry></feed> |