Files
advisory-db/feed.xml
T
2024-07-24 23:35:06 +00:00

2079 lines
95 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-07-23T12: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-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"> &lt;article&gt;
&lt;span class=&quot;floating-menu&quot;&gt;
&lt;a href=&quot;https://github.com/RustSec/advisory-db/commits/main/crates/object_store/RUSTSEC-2024-0358.md&quot;&gt;History&lt;/a&gt; ⋅
&lt;a href=&quot;https://github.com/RustSec/advisory-db/edit/main/crates/object_store/RUSTSEC-2024-0358.md&quot;&gt;Edit&lt;/a&gt; ⋅
&lt;a href=&quot;https://api.osv.dev/v1/vulns/RUSTSEC-2024-0358&quot;&gt;JSON (OSV)&lt;/a&gt;
&lt;/span&gt;
&lt;header&gt;
&lt;h1&gt;
RUSTSEC-2024-0358
&lt;/h1&gt;
&lt;span class=&quot;subtitle&quot;&gt;&lt;p&gt;Apache Arrow Rust Object Store: AWS WebIdentityToken exposure in log files&lt;/p&gt;
&lt;/span&gt;
&lt;/header&gt;
&lt;dl&gt;
&lt;dt id=&quot;reported&quot;&gt;Reported&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-23&quot;&gt;
July 23, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;issued&quot;&gt;Issued&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-23&quot;&gt;
July 23, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;package&quot;&gt;Package&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/packages/object_store.html&quot;&gt;object_store&lt;/a&gt;
(&lt;a href=&quot;https://crates.io/crates/object_store&quot;&gt;crates.io&lt;/a&gt;)
&lt;/dd&gt;
&lt;dt id=&quot;type&quot;&gt;Type&lt;/dt&gt;
&lt;dd&gt;
Vulnerability
&lt;/dd&gt;
&lt;dt id=&quot;keywords&quot;&gt;Keywords&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/keywords/information.html&quot;&gt;#information&lt;/a&gt;
&lt;a href=&quot;/keywords/leak.html&quot;&gt;#leak&lt;/a&gt;
&lt;a href=&quot;/keywords/aws.html&quot;&gt;#aws&lt;/a&gt;
&lt;a href=&quot;/keywords/oidc.html&quot;&gt;#oidc&lt;/a&gt;
&lt;a href=&quot;/keywords/logs.html&quot;&gt;#logs&lt;/a&gt;
&lt;/dd&gt;
&lt;dt id=&quot;aliases&quot;&gt;Aliases&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-41178&quot;&gt;CVE-2024-41178&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;details&quot;&gt;References&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/apache/arrow-rs/pull/6074&quot;&gt;
https://github.com/apache/arrow-rs/pull/6074
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://www.openwall.com/lists/oss-security/2024/07/23/3&quot;&gt;
https://www.openwall.com/lists/oss-security/2024/07/23/3
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;cvss_score&quot;&gt;CVSS Score&lt;/dt&gt;
&lt;dd&gt;3.8 &lt;span class=&quot;tag low&quot;&gt;
LOW
&lt;/span&gt;&lt;/dd&gt;
&lt;dt id=&quot;cvss_details&quot;&gt;CVSS Details&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;Attack vector&lt;/dt&gt;&lt;dd&gt;Local&lt;/dd&gt;
&lt;dt&gt;Attack complexity&lt;/dt&gt;&lt;dd&gt;Low&lt;/d&gt;
&lt;dt&gt;Privileges required&lt;/dt&gt;&lt;dd&gt;Low&lt;/dd&gt;
&lt;dt&gt;User interaction&lt;/dt&gt;&lt;dd&gt;None&lt;/dd&gt;
&lt;dt&gt;Scope&lt;/dt&gt;&lt;dd&gt;Changed&lt;/dd&gt;
&lt;dt&gt;Confidentiality&lt;/dt&gt;&lt;dd&gt;Low&lt;/dd&gt;
&lt;dt&gt;Integrity&lt;/dt&gt;&lt;dd&gt;None&lt;/dd&gt;
&lt;dt&gt;Availability&lt;/dt&gt;&lt;dd&gt;None&lt;/dd&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt id=&quot;cvss&quot;&gt;CVSS Vector&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;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&quot;&gt;CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N&lt;/a&gt;&lt;/dd&gt;
&lt;dt id=&quot;patched&quot;&gt;Patched&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;gt;=0.10.2&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;unaffected&quot;&gt;Unaffected&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;0.5.0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id=&quot;description&quot;&gt;Description&lt;/h3&gt;
&lt;p&gt;Exposure of temporary credentials in logs in Apache Arrow Rust Object Store,
version 0.10.1 and earlier on all platforms using AWS WebIdentityTokens.&lt;/p&gt;
&lt;p&gt;On certain error conditions, the logs may contain the OIDC token passed to
&lt;a href=&quot;https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html&quot;&gt;AssumeRoleWithWebIdentity&lt;/a&gt;.
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.&lt;/p&gt;
&lt;p&gt;Users are recommended to use a different AWS authentication mechanism, disable
logging or upgrade to version 0.10.2, which fixes this issue.&lt;/p&gt;
&lt;h2&gt;Details&lt;/h2&gt;
&lt;p&gt;When using AWS WebIdentityTokens with the &lt;code&gt;object_store&lt;/code&gt; crate, in the event of
a failure and automatic retry, the underlying &lt;code&gt;reqwest&lt;/code&gt; error, including the
full URL with the credentials, potentially in the parameters, is written to the
logs.&lt;/p&gt;
&lt;p&gt;Thanks to Paul Hatcherian for reporting this vulnerability&lt;/p&gt;
&lt;p id=&quot;license&quot; class=&quot;license&quot;&gt;Advisory available under &lt;a href=&quot;https://spdx.org/licenses/CC0-1.0.html&quot;&gt;CC0-1.0&lt;/a&gt;
license.
&lt;/p&gt;
&lt;/article&gt;</content></entry><entry><title>RUSTSEC-2024-0357: Vulnerability in openssl</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0357.html</id><updated>2024-07-21T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0357.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0357: Vulnerability in openssl"/><published>2024-07-21T12:00:00+00:00</published><summary xml:lang="en">`MemBio::get_buf` has undefined behavior with empty buffers</summary><content xml:lang="en" type="html"> &lt;article&gt;
&lt;span class=&quot;floating-menu&quot;&gt;
&lt;a href=&quot;https://github.com/RustSec/advisory-db/commits/main/crates/openssl/RUSTSEC-2024-0357.md&quot;&gt;History&lt;/a&gt; ⋅
&lt;a href=&quot;https://github.com/RustSec/advisory-db/edit/main/crates/openssl/RUSTSEC-2024-0357.md&quot;&gt;Edit&lt;/a&gt; ⋅
&lt;a href=&quot;https://api.osv.dev/v1/vulns/RUSTSEC-2024-0357&quot;&gt;JSON (OSV)&lt;/a&gt;
&lt;/span&gt;
&lt;header&gt;
&lt;h1&gt;
RUSTSEC-2024-0357
&lt;/h1&gt;
&lt;span class=&quot;subtitle&quot;&gt;&lt;p&gt;&lt;code&gt;MemBio::get_buf&lt;/code&gt; has undefined behavior with empty buffers&lt;/p&gt;
&lt;/span&gt;
&lt;/header&gt;
&lt;dl&gt;
&lt;dt id=&quot;reported&quot;&gt;Reported&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-21&quot;&gt;
July 21, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;issued&quot;&gt;Issued&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-21&quot;&gt;
July 21, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;package&quot;&gt;Package&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/packages/openssl.html&quot;&gt;openssl&lt;/a&gt;
(&lt;a href=&quot;https://crates.io/crates/openssl&quot;&gt;crates.io&lt;/a&gt;)
&lt;/dd&gt;
&lt;dt id=&quot;type&quot;&gt;Type&lt;/dt&gt;
&lt;dd&gt;
Vulnerability
&lt;/dd&gt;
&lt;dt id=&quot;details&quot;&gt;References&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/sfackler/rust-openssl/pull/2266&quot;&gt;
https://github.com/sfackler/rust-openssl/pull/2266
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;patched&quot;&gt;Patched&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;gt;=0.10.66&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;Affected Functions&lt;/dt&gt;
&lt;dd&gt;Version&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;openssl::bio::MemBio::get_buf&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;0.10.66, &amp;gt;=0.8.0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id=&quot;description&quot;&gt;Description&lt;/h3&gt;
&lt;p&gt;Previously, &lt;code&gt;MemBio::get_buf&lt;/code&gt; called &lt;code&gt;slice::from_raw_parts&lt;/code&gt; with a null-pointer, which violates the functions invariants, leading to undefined behavior. In debug builds this would produce an assertion failure. This is now fixed.&lt;/p&gt;
&lt;p id=&quot;license&quot; class=&quot;license&quot;&gt;Advisory available under &lt;a href=&quot;https://spdx.org/licenses/CC0-1.0.html&quot;&gt;CC0-1.0&lt;/a&gt;
license.
&lt;/p&gt;
&lt;/article&gt;</content></entry><entry><title>RUSTSEC-2024-0356: Vulnerability in matrix-sdk-crypto</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0356.html</id><updated>2024-07-19T12:00:00+00:00</updated><category term="crypto-failure"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0356.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0356: Vulnerability in matrix-sdk-crypto"/><published>2024-07-19T12:00:00+00:00</published><summary xml:lang="en">`UserIdentity::is_verified` not checking verification status of own user identity while performing the check</summary><content xml:lang="en" type="html"> &lt;article&gt;
&lt;span class=&quot;floating-menu&quot;&gt;
&lt;a href=&quot;https://github.com/RustSec/advisory-db/commits/main/crates/matrix-sdk-crypto/RUSTSEC-2024-0356.md&quot;&gt;History&lt;/a&gt; ⋅
&lt;a href=&quot;https://github.com/RustSec/advisory-db/edit/main/crates/matrix-sdk-crypto/RUSTSEC-2024-0356.md&quot;&gt;Edit&lt;/a&gt; ⋅
&lt;a href=&quot;https://api.osv.dev/v1/vulns/RUSTSEC-2024-0356&quot;&gt;JSON (OSV)&lt;/a&gt;
&lt;/span&gt;
&lt;header&gt;
&lt;h1&gt;
RUSTSEC-2024-0356
&lt;/h1&gt;
&lt;span class=&quot;subtitle&quot;&gt;&lt;p&gt;&lt;code&gt;UserIdentity::is_verified&lt;/code&gt; not checking verification status of own user identity while performing the check&lt;/p&gt;
&lt;/span&gt;
&lt;/header&gt;
&lt;dl&gt;
&lt;dt id=&quot;reported&quot;&gt;Reported&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-18&quot;&gt;
July 18, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;issued&quot;&gt;Issued&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-19&quot;&gt;
July 19, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;package&quot;&gt;Package&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/packages/matrix-sdk-crypto.html&quot;&gt;matrix-sdk-crypto&lt;/a&gt;
(&lt;a href=&quot;https://crates.io/crates/matrix-sdk-crypto&quot;&gt;crates.io&lt;/a&gt;)
&lt;/dd&gt;
&lt;dt id=&quot;type&quot;&gt;Type&lt;/dt&gt;
&lt;dd&gt;
Vulnerability
&lt;/dd&gt;
&lt;dt id=&quot;categories&quot;&gt;Categories&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/categories/crypto-failure.html&quot;&gt;crypto-failure&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;aliases&quot;&gt;Aliases&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-40648&quot;&gt;CVE-2024-40648&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/advisories/GHSA-4qg4-cvh2-crgg&quot;&gt;GHSA-4qg4-cvh2-crgg&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;details&quot;&gt;References&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-4qg4-cvh2-crgg&quot;&gt;
https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-4qg4-cvh2-crgg
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;patched&quot;&gt;Patched&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;gt;=0.7.2&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;Affected Functions&lt;/dt&gt;
&lt;dd&gt;Version&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;matrix_sdk_crypto::UserIdentity::is_verified&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;0.7.2&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id=&quot;description&quot;&gt;Description&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;UserIdentity::is_verified()&lt;/code&gt; method in the matrix-sdk-crypto crate before
version 0.7.2 doesn&apos;t take into account the verification status of the user&apos;s
own identity while performing the check and may as a result return a value
contrary to what is implied by its name and documentation.&lt;/p&gt;
&lt;h2&gt;Impact&lt;/h2&gt;
&lt;p&gt;If the method is used to decide whether to perform sensitive operations towards
a user identity, a malicious homeserver could manipulate the outcome in order to
make the identity appear trusted. This is not a typical usage of the method,
which lowers the impact. The method itself is not used inside the
matrix-sdk-crypto crate.&lt;/p&gt;
&lt;p id=&quot;license&quot; class=&quot;license&quot;&gt;Advisory available under &lt;a href=&quot;https://spdx.org/licenses/CC0-1.0.html&quot;&gt;CC0-1.0&lt;/a&gt;
license.
&lt;/p&gt;
&lt;/article&gt;</content></entry><entry><title>RUSTSEC-2024-0354: Vulnerability in vodozemac</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0354.html</id><updated>2024-07-18T12:00:00+00:00</updated><category term="crypto-failure"/><category term="memory-exposure"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0354.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0354: Vulnerability in vodozemac"/><published>2024-07-18T12:00:00+00:00</published><summary xml:lang="en"> Usage of non-constant time base64 decoder could lead to leakage of secret key material</summary><content xml:lang="en" type="html"> &lt;article&gt;
&lt;span class=&quot;floating-menu&quot;&gt;
&lt;a href=&quot;https://github.com/RustSec/advisory-db/commits/main/crates/vodozemac/RUSTSEC-2024-0354.md&quot;&gt;History&lt;/a&gt; ⋅
&lt;a href=&quot;https://github.com/RustSec/advisory-db/edit/main/crates/vodozemac/RUSTSEC-2024-0354.md&quot;&gt;Edit&lt;/a&gt; ⋅
&lt;a href=&quot;https://api.osv.dev/v1/vulns/RUSTSEC-2024-0354&quot;&gt;JSON (OSV)&lt;/a&gt;
&lt;/span&gt;
&lt;header&gt;
&lt;h1&gt;
RUSTSEC-2024-0354
&lt;/h1&gt;
&lt;span class=&quot;subtitle&quot;&gt;&lt;p&gt;Usage of non-constant time base64 decoder could lead to leakage of secret key material&lt;/p&gt;
&lt;/span&gt;
&lt;/header&gt;
&lt;dl&gt;
&lt;dt id=&quot;reported&quot;&gt;Reported&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-17&quot;&gt;
July 17, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;issued&quot;&gt;Issued&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-18&quot;&gt;
July 18, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;package&quot;&gt;Package&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/packages/vodozemac.html&quot;&gt;vodozemac&lt;/a&gt;
(&lt;a href=&quot;https://crates.io/crates/vodozemac&quot;&gt;crates.io&lt;/a&gt;)
&lt;/dd&gt;
&lt;dt id=&quot;type&quot;&gt;Type&lt;/dt&gt;
&lt;dd&gt;
Vulnerability
&lt;/dd&gt;
&lt;dt id=&quot;categories&quot;&gt;Categories&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/categories/crypto-failure.html&quot;&gt;crypto-failure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/categories/memory-exposure.html&quot;&gt;memory-exposure&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;aliases&quot;&gt;Aliases&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-40640&quot;&gt;CVE-2024-40640&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/advisories/GHSA-j8cm-g7r6-hfpq&quot;&gt;GHSA-j8cm-g7r6-hfpq&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;details&quot;&gt;References&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/matrix-org/vodozemac/security/advisories/GHSA-j8cm-g7r6-hfpq&quot;&gt;
https://github.com/matrix-org/vodozemac/security/advisories/GHSA-j8cm-g7r6-hfpq
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;patched&quot;&gt;Patched&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;gt;=0.7.0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id=&quot;description&quot;&gt;Description&lt;/h3&gt;
&lt;p&gt;Versions before 0.7.0 of vodozemac use a non-constant time base64 implementation
for importing key material for Megolm group sessions and &lt;code&gt;PkDecryption&lt;/code&gt; Ed25519
secret keys. This flaw might allow an attacker to infer some information about
the secret key material through a side-channel attack.&lt;/p&gt;
&lt;h2&gt;Impact&lt;/h2&gt;
&lt;p&gt;The use of a non-constant time base64 implementation might allow an attacker to
observe timing variations in the encoding and decoding operations of the secret
key material. This could potentially provide insights into the underlying secret
key material.&lt;/p&gt;
&lt;p&gt;The impact of this vulnerability is considered low because exploiting the
attacker is required to have access to high precision timing measurements, as
well as repeated access to the base64 encoding or decoding processes.
Additionally, the estimated leakage amount is bounded and low according to the
referenced paper[&lt;a href=&quot;https://arxiv.org/abs/2108.04600&quot;&gt;1&lt;/a&gt;].&lt;/p&gt;
&lt;p id=&quot;license&quot; class=&quot;license&quot;&gt;Advisory available under &lt;a href=&quot;https://spdx.org/licenses/CC0-1.0.html&quot;&gt;CC0-1.0&lt;/a&gt;
license.
&lt;/p&gt;
&lt;/article&gt;</content></entry><entry><title>RUSTSEC-2024-0355: Vulnerability in gix-path</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0355.html</id><updated>2024-07-18T12:00:00+00:00</updated><category term="code-execution"/><category term="privilege-escalation"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0355.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0355: Vulnerability in gix-path"/><published>2024-07-18T12:00:00+00:00</published><summary xml:lang="en">gix-path can use a fake program files location</summary><content xml:lang="en" type="html"> &lt;article&gt;
&lt;span class=&quot;floating-menu&quot;&gt;
&lt;a href=&quot;https://github.com/RustSec/advisory-db/commits/main/crates/gix-path/RUSTSEC-2024-0355.md&quot;&gt;History&lt;/a&gt; ⋅
&lt;a href=&quot;https://github.com/RustSec/advisory-db/edit/main/crates/gix-path/RUSTSEC-2024-0355.md&quot;&gt;Edit&lt;/a&gt; ⋅
&lt;a href=&quot;https://api.osv.dev/v1/vulns/RUSTSEC-2024-0355&quot;&gt;JSON (OSV)&lt;/a&gt;
&lt;/span&gt;
&lt;header&gt;
&lt;h1&gt;
RUSTSEC-2024-0355
&lt;/h1&gt;
&lt;span class=&quot;subtitle&quot;&gt;&lt;p&gt;gix-path can use a fake program files location&lt;/p&gt;
&lt;/span&gt;
&lt;/header&gt;
&lt;dl&gt;
&lt;dt id=&quot;reported&quot;&gt;Reported&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-18&quot;&gt;
July 18, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;issued&quot;&gt;Issued&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-18&quot;&gt;
July 18, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;package&quot;&gt;Package&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/packages/gix-path.html&quot;&gt;gix-path&lt;/a&gt;
(&lt;a href=&quot;https://crates.io/crates/gix-path&quot;&gt;crates.io&lt;/a&gt;)
&lt;/dd&gt;
&lt;dt id=&quot;type&quot;&gt;Type&lt;/dt&gt;
&lt;dd&gt;
Vulnerability
&lt;/dd&gt;
&lt;dt id=&quot;categories&quot;&gt;Categories&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/categories/code-execution.html&quot;&gt;code-execution&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/categories/privilege-escalation.html&quot;&gt;privilege-escalation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;keywords&quot;&gt;Keywords&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/keywords/search-path.html&quot;&gt;#search-path&lt;/a&gt;
&lt;/dd&gt;
&lt;dt id=&quot;aliases&quot;&gt;Aliases&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-40644&quot;&gt;CVE-2024-40644&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/advisories/GHSA-mgvv-9p9g-3jv4&quot;&gt;GHSA-mgvv-9p9g-3jv4&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;details&quot;&gt;References&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/Byron/gitoxide/security/advisories/GHSA-mgvv-9p9g-3jv4&quot;&gt;
https://github.com/Byron/gitoxide/security/advisories/GHSA-mgvv-9p9g-3jv4
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/advisories/GHSA-mgvv-9p9g-3jv4&quot;&gt;
https://github.com/advisories/GHSA-mgvv-9p9g-3jv4
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;cvss_score&quot;&gt;CVSS Score&lt;/dt&gt;
&lt;dd&gt;6.8 &lt;span class=&quot;tag medium&quot;&gt;
MEDIUM
&lt;/span&gt;&lt;/dd&gt;
&lt;dt id=&quot;cvss_details&quot;&gt;CVSS Details&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;Attack vector&lt;/dt&gt;&lt;dd&gt;Local&lt;/dd&gt;
&lt;dt&gt;Attack complexity&lt;/dt&gt;&lt;dd&gt;Low&lt;/d&gt;
&lt;dt&gt;Privileges required&lt;/dt&gt;&lt;dd&gt;Low&lt;/dd&gt;
&lt;dt&gt;User interaction&lt;/dt&gt;&lt;dd&gt;Required&lt;/dd&gt;
&lt;dt&gt;Scope&lt;/dt&gt;&lt;dd&gt;Unchanged&lt;/dd&gt;
&lt;dt&gt;Confidentiality&lt;/dt&gt;&lt;dd&gt;High&lt;/dd&gt;
&lt;dt&gt;Integrity&lt;/dt&gt;&lt;dd&gt;High&lt;/dd&gt;
&lt;dt&gt;Availability&lt;/dt&gt;&lt;dd&gt;Low&lt;/dd&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt id=&quot;cvss&quot;&gt;CVSS Vector&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L&quot;&gt;CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L&lt;/a&gt;&lt;/dd&gt;
&lt;dt id=&quot;patched&quot;&gt;Patched&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;gt;=0.10.9&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;unaffected&quot;&gt;Unaffected&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;0.10.8&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;Affected OSes&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;windows&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;Affected Functions&lt;/dt&gt;
&lt;dd&gt;Version&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;gix_path::env::exe_invocation&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;*&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;gix_path::env::installation_config&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;*&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;gix_path::env::installation_config_prefix&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;*&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;gix_path::env::system_prefix&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;*&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id=&quot;description&quot;&gt;Description&lt;/h3&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;When looking for Git for Windows so it can run it to report its paths, &lt;code&gt;gix-path&lt;/code&gt; can be tricked into running another &lt;code&gt;git.exe&lt;/code&gt; placed in an untrusted location by a limited user account.&lt;/p&gt;
&lt;h3&gt;Details&lt;/h3&gt;
&lt;p&gt;Windows permits limited user accounts without administrative privileges to create new directories in the root of the system drive. While &lt;code&gt;gix-path&lt;/code&gt; first looks for &lt;code&gt;git&lt;/code&gt; using a &lt;code&gt;PATH&lt;/code&gt; search, in version 0.10.8 it also has a fallback strategy on Windows of checking &lt;a href=&quot;https://github.com/Byron/gitoxide/blob/6cd8b4665bb7582f744c3244abaef812be39ec35/gix-path/src/env/git.rs#L9-L14&quot;&gt;two hard-coded paths&lt;/a&gt; intended to be the 64-bit and 32-bit Program Files directories:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-rust&quot;&gt;/// Other places to find Git in.
#[cfg(windows)]
pub(super) static ALTERNATIVE_LOCATIONS: &amp;amp;[&amp;amp;str] = &amp;amp;[
&amp;quot;C:/Program Files/Git/mingw64/bin&amp;quot;,
&amp;quot;C:/Program Files (x86)/Git/mingw32/bin&amp;quot;,
];
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Existing functions, as well as the newly introduced &lt;code&gt;exe_invocation&lt;/code&gt; function, were updated to make use of these alternative locations. This causes facilities in &lt;code&gt;gix_path::env&lt;/code&gt; to directly execute &lt;code&gt;git.exe&lt;/code&gt; in those locations, as well as to return its path or whatever configuration it reports to callers who rely on it.&lt;/p&gt;
&lt;p&gt;Although unusual setups where the system drive is not &lt;code&gt;C:&lt;/code&gt;, or even where Program Files directories have non-default names, are technically possible, the main problem arises on a 32-bit Windows system. Such a system has no &lt;code&gt;C:\Program Files (x86)&lt;/code&gt; directory.&lt;/p&gt;
&lt;p&gt;A limited user on a 32-bit Windows system can therefore create the &lt;code&gt;C:\Program Files (x86)&lt;/code&gt; directory and populate it with arbitrary contents. Once a payload has been placed at the second of the two hard-coded paths in this way, other user accounts including administrators will execute it if they run an application that uses &lt;code&gt;gix-path&lt;/code&gt; and do not have &lt;code&gt;git&lt;/code&gt; in a &lt;code&gt;PATH&lt;/code&gt; directory.&lt;/p&gt;
&lt;p&gt;(While having &lt;code&gt;git&lt;/code&gt; found in a &lt;code&gt;PATH&lt;/code&gt; search prevents exploitation, merely having it installed in the default location under the real &lt;code&gt;C:\Program Files&lt;/code&gt; directory does not. This is because the first hard-coded path&apos;s &lt;code&gt;mingw64&lt;/code&gt; component assumes a 64-bit installation.)&lt;/p&gt;
&lt;h3&gt;PoC&lt;/h3&gt;
&lt;p&gt;On a 32-bit (x86) Windows 10 system, with or without Git for Windows installed:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a limited user account in &lt;code&gt;lusrmgr.msc&lt;/code&gt; or the Settings application.&lt;/li&gt;
&lt;li&gt;Log in with that account and, using Windows Explorer or the &lt;code&gt;mkdir&lt;/code&gt; command in PowerShell, create the directories &lt;code&gt;C:\Program Files (x86)\Git\mingw32\bin&lt;/code&gt;. Although a limited user account cannot create regular files directly in &lt;code&gt;C:\&lt;/code&gt;, it can create directories including one called &lt;code&gt;Program Files (x86)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Place a copy of &lt;code&gt;C:\Windows\system32\calc.exe&lt;/code&gt; in &lt;code&gt;C:\Program Files (x86)\Git\mingw32\bin&lt;/code&gt; and rename it from &lt;code&gt;calc.exe&lt;/code&gt; to &lt;code&gt;git.exe&lt;/code&gt;. A different test payload may be used if preferred, and the executable need not already be signed or trusted.&lt;/li&gt;
&lt;li&gt;Log out, and log in as a different user. This user may be an administrator.&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;gitoxide&lt;/code&gt; is not installed, install it. If &lt;code&gt;cargo install gitoxide&lt;/code&gt; is used for the installation, then the version of &lt;code&gt;gix-path&lt;/code&gt; used in the installation can be observed.&lt;/li&gt;
&lt;li&gt;The vulnerability is only exploitable if &lt;code&gt;git&lt;/code&gt; cannot be found in a &lt;code&gt;PATH&lt;/code&gt; search. So, in PowerShell, run &lt;code&gt;gcm git&lt;/code&gt; to check if &lt;code&gt;git&lt;/code&gt; is present in the &lt;code&gt;PATH&lt;/code&gt;. If so, temporarily remove it. One way to do this is for the current shell only, by running &lt;code&gt;$env:PATH&lt;/code&gt; to inspect it and by assigning &lt;code&gt;$env:PATH = &apos;...&apos;&lt;/code&gt; where &lt;code&gt;...&lt;/code&gt; omits directories that contain &lt;code&gt;git&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Some commands that can be run outside a repository, and most commands that can be run inside a repository, will run the Calculator or other payload at least once per invocation. Try &lt;code&gt;gix clone foo&lt;/code&gt; or, inside of a repository, &lt;code&gt;gix status&lt;/code&gt;, &lt;code&gt;gix config&lt;/code&gt;, &lt;code&gt;gix is-changed&lt;/code&gt;, &lt;code&gt;gix fetch&lt;/code&gt;, &lt;code&gt;ein t hours&lt;/code&gt;, or &lt;code&gt;ein t query&lt;/code&gt;. This is not exhaustive; most other &lt;code&gt;gix&lt;/code&gt; and &lt;code&gt;ein&lt;/code&gt; commands that access existing repository state or a network resource likewise run the payload.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Impact&lt;/h3&gt;
&lt;p&gt;Only Windows is affected. Exploitation is unlikely except on a 32-bit system. In particular, running a 32-bit build on a 64-bit system is not a risk factor. Furthermore, the attacker must have a user account on the system, though it may be a relatively unprivileged account. Such a user can perform privilege escalation and execute code as another user, though it may be difficult to do so reliably because the targeted user account must run an application or service that uses &lt;code&gt;gix-path&lt;/code&gt; and must not have &lt;code&gt;git&lt;/code&gt; in its &lt;code&gt;PATH&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The main exploitable configuration is one where Git for Windows has been installed but not added to &lt;code&gt;PATH&lt;/code&gt;. This is one of the options in its installer, though not the default option. Alternatively, an affected program that sanitizes its &lt;code&gt;PATH&lt;/code&gt; to remove seemingly nonessential directories could allow exploitation. But for the most part, if the target user has configured a &lt;code&gt;PATH&lt;/code&gt; in which the real &lt;code&gt;git.exe&lt;/code&gt; can be found, then this cannot be exploited.&lt;/p&gt;
&lt;p&gt;This vulnerability is comparable to &lt;a href=&quot;https://github.com/git-for-windows/git/security/advisories/GHSA-vw2c-22j4-2fh2&quot;&gt;CVE-2022-24765&lt;/a&gt;, in which an uncontrolled path like &lt;code&gt;C:\.git\config&lt;/code&gt;, which a limited user can create, could supply configuration used by other users. However, in this case, exploitation is slightly simpler because, rather than using configuration, an executable is directly run.&lt;/p&gt;
&lt;p id=&quot;license&quot; class=&quot;license&quot;&gt;Advisory available under &lt;a href=&quot;https://spdx.org/licenses/CC0-1.0.html&quot;&gt;CC0-1.0&lt;/a&gt;
license.
&lt;/p&gt;
&lt;/article&gt;</content></entry><entry><title>RUSTSEC-2024-0350: Vulnerability in gix-fs</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0350.html</id><updated>2024-07-08T12:00:00+00:00</updated><category term="code-execution"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0350.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0350: Vulnerability in gix-fs"/><published>2024-07-08T12:00:00+00:00</published><summary xml:lang="en">Traversal outside working tree enables arbitrary code execution</summary><content xml:lang="en" type="html"> &lt;article&gt;
&lt;span class=&quot;floating-menu&quot;&gt;
&lt;a href=&quot;https://github.com/RustSec/advisory-db/commits/main/crates/gix-fs/RUSTSEC-2024-0350.md&quot;&gt;History&lt;/a&gt; ⋅
&lt;a href=&quot;https://github.com/RustSec/advisory-db/edit/main/crates/gix-fs/RUSTSEC-2024-0350.md&quot;&gt;Edit&lt;/a&gt; ⋅
&lt;a href=&quot;https://api.osv.dev/v1/vulns/RUSTSEC-2024-0350&quot;&gt;JSON (OSV)&lt;/a&gt;
&lt;/span&gt;
&lt;header&gt;
&lt;h1&gt;
RUSTSEC-2024-0350
&lt;/h1&gt;
&lt;span class=&quot;subtitle&quot;&gt;&lt;p&gt;Traversal outside working tree enables arbitrary code execution&lt;/p&gt;
&lt;/span&gt;
&lt;/header&gt;
&lt;dl&gt;
&lt;dt id=&quot;reported&quot;&gt;Reported&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-05-22&quot;&gt;
May 22, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;issued&quot;&gt;Issued&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-08&quot;&gt;
July 8, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;package&quot;&gt;Package&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/packages/gix-fs.html&quot;&gt;gix-fs&lt;/a&gt;
(&lt;a href=&quot;https://crates.io/crates/gix-fs&quot;&gt;crates.io&lt;/a&gt;)
&lt;/dd&gt;
&lt;dt id=&quot;type&quot;&gt;Type&lt;/dt&gt;
&lt;dd&gt;
Vulnerability
&lt;/dd&gt;
&lt;dt id=&quot;categories&quot;&gt;Categories&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/categories/code-execution.html&quot;&gt;code-execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;keywords&quot;&gt;Keywords&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/keywords/directory-traversal.html&quot;&gt;#directory-traversal&lt;/a&gt;
&lt;/dd&gt;
&lt;dt id=&quot;aliases&quot;&gt;Aliases&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-35186&quot;&gt;CVE-2024-35186&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/advisories/GHSA-7w47-3wg8-547c&quot;&gt;GHSA-7w47-3wg8-547c&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;details&quot;&gt;References&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/Byron/gitoxide/security/advisories/GHSA-7w47-3wg8-547c&quot;&gt;
https://github.com/Byron/gitoxide/security/advisories/GHSA-7w47-3wg8-547c
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/advisories/GHSA-7w47-3wg8-547c&quot;&gt;
https://github.com/advisories/GHSA-7w47-3wg8-547c
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://nvd.nist.gov/vuln/detail/CVE-2024-35186&quot;&gt;
https://nvd.nist.gov/vuln/detail/CVE-2024-35186
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;cvss_score&quot;&gt;CVSS Score&lt;/dt&gt;
&lt;dd&gt;8.8 &lt;span class=&quot;tag high&quot;&gt;
HIGH
&lt;/span&gt;&lt;/dd&gt;
&lt;dt id=&quot;cvss_details&quot;&gt;CVSS Details&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;Attack vector&lt;/dt&gt;&lt;dd&gt;Network&lt;/dd&gt;
&lt;dt&gt;Attack complexity&lt;/dt&gt;&lt;dd&gt;Low&lt;/d&gt;
&lt;dt&gt;Privileges required&lt;/dt&gt;&lt;dd&gt;None&lt;/dd&gt;
&lt;dt&gt;User interaction&lt;/dt&gt;&lt;dd&gt;Required&lt;/dd&gt;
&lt;dt&gt;Scope&lt;/dt&gt;&lt;dd&gt;Unchanged&lt;/dd&gt;
&lt;dt&gt;Confidentiality&lt;/dt&gt;&lt;dd&gt;High&lt;/dd&gt;
&lt;dt&gt;Integrity&lt;/dt&gt;&lt;dd&gt;High&lt;/dd&gt;
&lt;dt&gt;Availability&lt;/dt&gt;&lt;dd&gt;High&lt;/dd&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt id=&quot;cvss&quot;&gt;CVSS Vector&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H&quot;&gt;CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H&lt;/a&gt;&lt;/dd&gt;
&lt;dt id=&quot;patched&quot;&gt;Patched&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;gt;=0.11.0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id=&quot;description&quot;&gt;Description&lt;/h3&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;During checkout, gitoxide does not verify that paths point to locations in the working tree. A specially crafted repository can, when cloned, place new files anywhere writable by the application.&lt;/p&gt;
&lt;h3&gt;Details&lt;/h3&gt;
&lt;p&gt;Although &lt;code&gt;gix-worktree-state&lt;/code&gt; checks for collisions with existing files, it does not itself check if a path is really in the working tree when performing a checkout, nor do the path checks in &lt;code&gt;gix-fs&lt;/code&gt; and &lt;code&gt;gix-worktree&lt;/code&gt; prevent this. Cloning an untrusted repository containing specially crafted tree or blob names will create new files outside the repository, or inside the repository or a submodule&apos;s &lt;code&gt;.git&lt;/code&gt; directory. The simplest cases are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A tree named &lt;code&gt;..&lt;/code&gt; to traverse upward. This facilitates arbitrary code execution because files can be placed in one or more locations where they are likely to be executed soon.&lt;/li&gt;
&lt;li&gt;A tree named &lt;code&gt;.git&lt;/code&gt; to enter a &lt;code&gt;.git&lt;/code&gt; directory. This facilitates arbitrary code execution because hooks can be installed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A number of alternatives that achieve the same effect are also possible, some of which correspond to specific vulnerabilities that have affected Git in the past:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A tree or blob whose name contains one or more &lt;code&gt;/&lt;/code&gt;, to traverse upward or downward. For example, even without containing any tree named &lt;code&gt;..&lt;/code&gt; or &lt;code&gt;.git&lt;/code&gt;, a repository can represent a file named &lt;code&gt;../outside&lt;/code&gt; or &lt;code&gt;.git/hooks/pre-commit&lt;/code&gt;. This is distinct from the more intuitive case a repository containing trees that represent those paths.&lt;/li&gt;
&lt;li&gt;In Windows, a tree or blob whose name contains one or more &lt;code&gt;\&lt;/code&gt;, to traverse upward or downward. (Unlike &lt;code&gt;/&lt;/code&gt;, these are valid on other systems.) See &lt;a href=&quot;https://github.com/git/git/security/advisories/GHSA-xjx4-8694-q2fq&quot;&gt;GHSA-xjx4-8694-q2fq&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;On a case-insensitive filesystem (such as NTFS, APFS, or HFS+), a tree named as a case variant of &lt;code&gt;.git&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;On HFS+, a tree named like &lt;code&gt;.git&lt;/code&gt; or a case variant, with characters added that HFS+ ignores &lt;a href=&quot;https://developer.apple.com/library/archive/technotes/tn/tn1150.html#StringComparisonAlgorithm&quot;&gt;in collation&lt;/a&gt;. See https://github.com/git/git/commit/6162a1d323d24fd8cbbb1a6145a91fb849b2568f.&lt;/li&gt;
&lt;li&gt;On NTFS, a tree equivalent to &lt;code&gt;.git&lt;/code&gt; (or a case variant) by the use of &lt;a href=&quot;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/c54dec26-1551-4d3a-a0ea-4fa40f848eb3&quot;&gt;NTFS stream&lt;/a&gt; notation, such as &lt;code&gt;.git::$INDEX_ALLOCATION&lt;/code&gt;. See &lt;a href=&quot;https://github.com/git/git/security/advisories/GHSA-5wph-8frv-58vj&quot;&gt;GHSA-5wph-8frv-58vj&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;On an NTFS volume with &lt;a href=&quot;https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#short-vs-long-names&quot;&gt;8.3 aliasing&lt;/a&gt; enabled, a tree named as &lt;code&gt;git~1&lt;/code&gt; (or a case variant). See &lt;a href=&quot;https://github.com/git/git/security/advisories/GHSA-589j-mmg9-733v&quot;&gt;GHSA-589j-mmg9-733v&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When a checkout creates some files outside the repository directory but fails to complete, the repository directory is usually removed, but the outside files remain.&lt;/p&gt;
&lt;h3&gt;PoC&lt;/h3&gt;
&lt;p&gt;For simplicity, these examples stage a stand-in file with a valid name, modify the index, and commit. The instructions assume &lt;code&gt;sed&lt;/code&gt; supports &lt;code&gt;-i&lt;/code&gt;, which is the case on most systems. If using Windows, a Git Bash shell should be used.&lt;/p&gt;
&lt;h4&gt;Example: Downward traversal to install hooks&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Create a new repository with &lt;code&gt;git init dangerous-repo-installs-hook&lt;/code&gt; and &lt;code&gt;cd&lt;/code&gt; into the directory.&lt;/li&gt;
&lt;li&gt;Create the stand-in called &lt;code&gt;.git@hooks@pre-commit&lt;/code&gt;, with the &lt;em&gt;contents&lt;/em&gt;:
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;#!/bin/sh
printf &apos;Vulnerable!\n&apos;
date &amp;gt;vulnerable
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Stage the stand-in: &lt;code&gt;git add --chmod=+x .git@hooks@pre-commit&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Edit the index: &lt;code&gt;env LC_ALL=C sed -i.orig &apos;s|\.git@hooks@pre-commit|.git/hooks/pre-commit|&apos; .git/index&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Commit: &lt;code&gt;git commit -m &apos;Initial commit&apos;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Optionally&lt;/em&gt;, push to a private remote.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Then, on another or the same machine:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Clone the repository with a &lt;code&gt;gix clone …&lt;/code&gt; command.&lt;/li&gt;
&lt;li&gt;Enter the newly created directory.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Optionally&lt;/em&gt; run &lt;code&gt;ls -l .git/hooks&lt;/code&gt; to observe that the &lt;code&gt;pre-commit&lt;/code&gt; hook is already present.&lt;/li&gt;
&lt;li&gt;Make a new file and commit it with &lt;code&gt;git&lt;/code&gt;. This causes the payload surreptitiously installed as a &lt;code&gt;pre-commit&lt;/code&gt; hook to run, printing the message &lt;code&gt;Vulnerable!&lt;/code&gt; and creating a file in the current directory containing the current date and time.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note that the effect is not limited to modifying the current directory. The payload could be written to perform any action that the user who runs &lt;code&gt;git commit&lt;/code&gt; is capable of.&lt;/p&gt;
&lt;h4&gt;Example: Upward traversal to create a file above the working tree&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Create a new repository with &lt;code&gt;git init dangerous-repo-reaches-up&lt;/code&gt;, and &lt;code&gt;cd&lt;/code&gt; into the directory.&lt;/li&gt;
&lt;li&gt;Create the stand-in: &lt;code&gt;echo &apos;A file outside the working tree, somehow.&apos; &amp;gt;..@outside&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Stage the stand-in: &lt;code&gt;git add ..@outside&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Edit the index: &lt;code&gt;env LC_ALL=C sed -i.orig &apos;s|\.\.@outside|../outside|&apos; .git/index&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Commit: &lt;code&gt;git commit -m &apos;Initial commit&apos;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Optionally&lt;/em&gt;, push to a private remote.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Then, as above, on the same or another machine, clone the repository with a &lt;code&gt;gix clone …&lt;/code&gt; command. Observe that a file named &lt;code&gt;outside&lt;/code&gt; is present alongside (not inside) the cloned directory.&lt;/p&gt;
&lt;h3&gt;Impact&lt;/h3&gt;
&lt;p&gt;Any use of &lt;code&gt;gix&lt;/code&gt; or another application that makes use of &lt;code&gt;gix-worktree-state&lt;/code&gt;, or otherwise relies on &lt;code&gt;gix-fs&lt;/code&gt; and &lt;code&gt;gix-worktree&lt;/code&gt; for validation, is affected, if used to clone untrusted repositories. The above description focuses on code execution, as that leads to a complete loss of confidentiality, integrity, and availability, but creating files outside a working tree without attempting to execute code can directly impact integrity as well.&lt;/p&gt;
&lt;p&gt;In use cases where no untrusted repository is ever cloned, this vulnerability has no impact. Furthermore, the impact of this vulnerability &lt;em&gt;may&lt;/em&gt; be lower when &lt;code&gt;gix&lt;/code&gt; is used to clone a repository for CI/CD purposes, even if untrusted, since in such uses the environment is usually isolated and arbitrary code is usually run deliberately from the repository with necessary safeguards in place.&lt;/p&gt;
&lt;p id=&quot;license&quot; class=&quot;license&quot;&gt;Advisory available under &lt;a href=&quot;https://spdx.org/licenses/CC0-1.0.html&quot;&gt;CC0-1.0&lt;/a&gt;
license.
&lt;/p&gt;
&lt;/article&gt;</content></entry><entry><title>RUSTSEC-2024-0346: Vulnerability in zerovec-derive</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0346.html</id><updated>2024-07-08T12:00:00+00:00</updated><category term="memory-corruption"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0346.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0346: Vulnerability in zerovec-derive"/><published>2024-07-08T12:00:00+00:00</published><summary xml:lang="en">Incorrect usage of `#[repr(packed)]`</summary><content xml:lang="en" type="html"> &lt;article&gt;
&lt;span class=&quot;floating-menu&quot;&gt;
&lt;a href=&quot;https://github.com/RustSec/advisory-db/commits/main/crates/zerovec-derive/RUSTSEC-2024-0346.md&quot;&gt;History&lt;/a&gt; ⋅
&lt;a href=&quot;https://github.com/RustSec/advisory-db/edit/main/crates/zerovec-derive/RUSTSEC-2024-0346.md&quot;&gt;Edit&lt;/a&gt; ⋅
&lt;a href=&quot;https://api.osv.dev/v1/vulns/RUSTSEC-2024-0346&quot;&gt;JSON (OSV)&lt;/a&gt;
&lt;/span&gt;
&lt;header&gt;
&lt;h1&gt;
RUSTSEC-2024-0346
&lt;/h1&gt;
&lt;span class=&quot;subtitle&quot;&gt;&lt;p&gt;Incorrect usage of &lt;code&gt;#[repr(packed)]&lt;/code&gt;&lt;/p&gt;
&lt;/span&gt;
&lt;/header&gt;
&lt;dl&gt;
&lt;dt id=&quot;reported&quot;&gt;Reported&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-01&quot;&gt;
July 1, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;issued&quot;&gt;Issued&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-08&quot;&gt;
July 8, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;package&quot;&gt;Package&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/packages/zerovec-derive.html&quot;&gt;zerovec-derive&lt;/a&gt;
(&lt;a href=&quot;https://crates.io/crates/zerovec-derive&quot;&gt;crates.io&lt;/a&gt;)
&lt;/dd&gt;
&lt;dt id=&quot;type&quot;&gt;Type&lt;/dt&gt;
&lt;dd&gt;
Vulnerability
&lt;/dd&gt;
&lt;dt id=&quot;categories&quot;&gt;Categories&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/categories/memory-corruption.html&quot;&gt;memory-corruption&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;patched&quot;&gt;Patched&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;gt;=0.10.3&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;gt;=0.9.7, &amp;lt;0.10.0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id=&quot;description&quot;&gt;Description&lt;/h3&gt;
&lt;p&gt;The affected versions make unsafe memory accesses under the assumption that &lt;code&gt;#[repr(packed)]&lt;/code&gt; has a guaranteed field order.&lt;/p&gt;
&lt;p&gt;The Rust specification does not guarantee this, and https://github.com/rust-lang/rust/pull/125360 (1.80.0-beta) starts
reordering fields of &lt;code&gt;#[repr(packed)]&lt;/code&gt; structs, leading to illegal memory accesses.&lt;/p&gt;
&lt;p&gt;The patched versions &lt;code&gt;0.9.7&lt;/code&gt; and &lt;code&gt;0.10.3&lt;/code&gt; use &lt;code&gt;#[repr(C, packed)]&lt;/code&gt;, which guarantees field order.&lt;/p&gt;
&lt;p id=&quot;license&quot; class=&quot;license&quot;&gt;Advisory available under &lt;a href=&quot;https://spdx.org/licenses/CC0-1.0.html&quot;&gt;CC0-1.0&lt;/a&gt;
license.
&lt;/p&gt;
&lt;/article&gt;</content></entry><entry><title>RUSTSEC-2024-0353: Vulnerability in gix-worktree</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0353.html</id><updated>2024-07-08T12:00:00+00:00</updated><link href="https://rustsec.org/advisories/RUSTSEC-2024-0353.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0353: Vulnerability in gix-worktree"/><published>2024-07-08T12:00:00+00:00</published><summary xml:lang="en">Refs and paths with reserved Windows device names access the devices</summary><content xml:lang="en" type="html"> &lt;article&gt;
&lt;span class=&quot;floating-menu&quot;&gt;
&lt;a href=&quot;https://github.com/RustSec/advisory-db/commits/main/crates/gix-worktree/RUSTSEC-2024-0353.md&quot;&gt;History&lt;/a&gt; ⋅
&lt;a href=&quot;https://github.com/RustSec/advisory-db/edit/main/crates/gix-worktree/RUSTSEC-2024-0353.md&quot;&gt;Edit&lt;/a&gt; ⋅
&lt;a href=&quot;https://api.osv.dev/v1/vulns/RUSTSEC-2024-0353&quot;&gt;JSON (OSV)&lt;/a&gt;
&lt;/span&gt;
&lt;header&gt;
&lt;h1&gt;
RUSTSEC-2024-0353
&lt;/h1&gt;
&lt;span class=&quot;subtitle&quot;&gt;&lt;p&gt;Refs and paths with reserved Windows device names access the devices&lt;/p&gt;
&lt;/span&gt;
&lt;/header&gt;
&lt;dl&gt;
&lt;dt id=&quot;reported&quot;&gt;Reported&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-05-22&quot;&gt;
May 22, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;issued&quot;&gt;Issued&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-08&quot;&gt;
July 8, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;package&quot;&gt;Package&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/packages/gix-worktree.html&quot;&gt;gix-worktree&lt;/a&gt;
(&lt;a href=&quot;https://crates.io/crates/gix-worktree&quot;&gt;crates.io&lt;/a&gt;)
&lt;/dd&gt;
&lt;dt id=&quot;type&quot;&gt;Type&lt;/dt&gt;
&lt;dd&gt;
Vulnerability
&lt;/dd&gt;
&lt;dt id=&quot;aliases&quot;&gt;Aliases&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-35197&quot;&gt;CVE-2024-35197&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/advisories/GHSA-49jc-r788-3fc9&quot;&gt;GHSA-49jc-r788-3fc9&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;details&quot;&gt;References&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/Byron/gitoxide/security/advisories/GHSA-49jc-r788-3fc9&quot;&gt;
https://github.com/Byron/gitoxide/security/advisories/GHSA-49jc-r788-3fc9
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/advisories/GHSA-49jc-r788-3fc9&quot;&gt;
https://github.com/advisories/GHSA-49jc-r788-3fc9
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://nvd.nist.gov/vuln/detail/CVE-2024-35197&quot;&gt;
https://nvd.nist.gov/vuln/detail/CVE-2024-35197
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;cvss_score&quot;&gt;CVSS Score&lt;/dt&gt;
&lt;dd&gt;5.4 &lt;span class=&quot;tag medium&quot;&gt;
MEDIUM
&lt;/span&gt;&lt;/dd&gt;
&lt;dt id=&quot;cvss_details&quot;&gt;CVSS Details&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;Attack vector&lt;/dt&gt;&lt;dd&gt;Network&lt;/dd&gt;
&lt;dt&gt;Attack complexity&lt;/dt&gt;&lt;dd&gt;Low&lt;/d&gt;
&lt;dt&gt;Privileges required&lt;/dt&gt;&lt;dd&gt;None&lt;/dd&gt;
&lt;dt&gt;User interaction&lt;/dt&gt;&lt;dd&gt;Required&lt;/dd&gt;
&lt;dt&gt;Scope&lt;/dt&gt;&lt;dd&gt;Unchanged&lt;/dd&gt;
&lt;dt&gt;Confidentiality&lt;/dt&gt;&lt;dd&gt;None&lt;/dd&gt;
&lt;dt&gt;Integrity&lt;/dt&gt;&lt;dd&gt;Low&lt;/dd&gt;
&lt;dt&gt;Availability&lt;/dt&gt;&lt;dd&gt;Low&lt;/dd&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt id=&quot;cvss&quot;&gt;CVSS Vector&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L&quot;&gt;CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L&lt;/a&gt;&lt;/dd&gt;
&lt;dt id=&quot;patched&quot;&gt;Patched&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;gt;=0.34.0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;Affected OSes&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;windows&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id=&quot;description&quot;&gt;Description&lt;/h3&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;On Windows, fetching refs that clash with legacy device names reads from the devices, and checking out paths that clash with such names writes arbitrary data to the devices. This allows a repository, when cloned, to cause indefinite blocking or the production of arbitrary message that appear to have come from the application, and potentially other harmful effects under limited circumstances.&lt;/p&gt;
&lt;h3&gt;Details&lt;/h3&gt;
&lt;p&gt;It is possible to create a Git repository that contains references or filenames that Windows treats as legacy DOS-style aliases for system devices. When such a repository is cloned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In references, &lt;code&gt;gix-ref&lt;/code&gt; does not include a check for such names before attempting to access them on disk, which reads from the devices, though the ability to exfiltrate data appears limited.&lt;/li&gt;
&lt;li&gt;In paths, &lt;code&gt;gix-worktree-state&lt;/code&gt; does not treat such names as collisions and instead writes to them, which writes arbitrary attacker-controlled data to the devices.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some such device names refer to devices that are often absent or inaccessible. But a few are guaranteed to be available, allowing some attacks to be carried out with low complexity. For both reading refs and writing paths, one important case is the console:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reading a ref whose last component (e.g., tag name) is &lt;code&gt;CON&lt;/code&gt; or &lt;code&gt;CONIN$&lt;/code&gt; reads data from the console, thereby blocking on console input, including in most situations where a console is not readily available. This may facilitate denial of service attacks.&lt;/li&gt;
&lt;li&gt;Checking out a file named &lt;code&gt;CON&lt;/code&gt; or &lt;code&gt;CONOUT$&lt;/code&gt; writes its contents to the console. This allows an untrusted repository to produce arbitrary text that appears to be a message from the application. Such text may facilitate social engineering if it is selected to instruct the user to perform a particular action.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Another potentially important case is serial ports. For example, &lt;code&gt;COM1&lt;/code&gt; refers to the first serial port, if present. A malicious repository may be able to disrupt intended use of serial ports or attempt to interact with a device. In some configurations, it may be possible to interfere with the operation of a physical or virtual serial console. On Windows, local access to serial ports is often permitted even for limited user accounts without elevation.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions&quot;&gt;Naming Files, Paths, and Namespaces&lt;/a&gt; covers most reserved names. &lt;code&gt;CONIN$&lt;/code&gt; and &lt;code&gt;CONOUT$&lt;/code&gt; are also special, and are similar in effect to &lt;code&gt;CON&lt;/code&gt; but for only input or only output. These names are case-insensitive and can also be accessed with file extensions (e.g, &lt;code&gt;CON.txt&lt;/code&gt; is equivalent to &lt;code&gt;CON&lt;/code&gt;) and with some variations involving added spaces or colons.&lt;/p&gt;
&lt;h3&gt;PoC&lt;/h3&gt;
&lt;h4&gt;Ref example&lt;/h4&gt;
&lt;p&gt;Create a repository on a non-Windows system (or in WSL) with at least one commit. Use &lt;code&gt;git tag CON&lt;/code&gt; to create a lightweight tag named &lt;code&gt;CON&lt;/code&gt;. Place the repository somewhere it can be cloned on Windows. A &lt;code&gt;file://&lt;/code&gt; URL is sufficient for testing if a private remote is unavailable. If using &lt;code&gt;git push&lt;/code&gt;, pass &lt;code&gt;--tags&lt;/code&gt; so the remote has the tag.&lt;/p&gt;
&lt;p&gt;On a Windows system, clone the repository with &lt;code&gt;gix clone&lt;/code&gt;. This command will block immediately, reading input from the console. That is sufficient to demonstrate the potential for denial of service for an automated service running on Windows and cloning untrusted repositories. The experiment can be stopped with &lt;!-- raw HTML omitted --&gt;Ctrl&lt;!-- raw HTML omitted --&gt;+&lt;!-- raw HTML omitted --&gt;C&lt;!-- raw HTML omitted --&gt;.&lt;/p&gt;
&lt;p&gt;However, if desired, input can be provided. Ending input with &lt;!-- raw HTML omitted --&gt;Ctrl&lt;!-- raw HTML omitted --&gt;+&lt;!-- raw HTML omitted --&gt;Z&lt;!-- raw HTML omitted --&gt; followed by &lt;!-- raw HTML omitted --&gt;Enter&lt;!-- raw HTML omitted --&gt; will cause it to be passed to the application. This will lead to an error message, the specific details of which vary by whether the input is empty or nonempty, and whether it matches or does not match the hexadecimal hash of the tagged commit.&lt;/p&gt;
&lt;h4&gt;Path example&lt;/h4&gt;
&lt;p&gt;Create a repository on a non-Windows system (or in WSL) and commit a file named &lt;code&gt;CON&lt;/code&gt; with the contents:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;warning: data loss imminent; you should run EVIL_COMMAND to back up your work!
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;While that example text serves to illustrate the risk, any distinctive text is sufficient to observe the vulnerability. Place the repository somewhere it can be cloned on Windows. As above, a &lt;code&gt;file://&lt;/code&gt; URL is sufficient.&lt;/p&gt;
&lt;p&gt;On a Windows system, clone the repository with &lt;code&gt;gix clone&lt;/code&gt;. The output usually looks like this, with the deceptive message appearing to come from &lt;code&gt;gix&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;warning: data loss imminent; you should run EVIL_COMMAND to back up your work!
04:45:15 indexing done 3.0 objects in 0.00s (12.1K objects/s)
04:45:15 decompressing done 309B in 0.00s (1.2MB/s)
04:45:15 Resolving done 3.0 objects in 0.05s (58.0 objects/s)
04:45:15 Decoding done 309B in 0.05s (6.0KB/s)
04:45:15 writing index file done 1.2KB in 0.00s (7.0MB/s)
04:45:15 create index file done 3.0 objects in 0.05s (55.0 objects/s)
04:45:15 read pack done 294B in 0.05s (5.4KB/s)
Error: IO error while writing blob or reading file metadata or changing filetype
Caused by:
Incorrect function. (os error 1)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The exact placement of the message is nondeterministic. It usually appears in that position, but may appear elsewhere, such as before the &lt;code&gt;Error:&lt;/code&gt; line. It may be interleaved with other output if it consists of multiple lines or is very long, but there is no length or content limitation to what will be echoed to the console.&lt;/p&gt;
&lt;h3&gt;Impact&lt;/h3&gt;
&lt;p&gt;If Windows is not used, or untrusted repositories are not cloned or otherwise used, then there is no impact.&lt;/p&gt;
&lt;p&gt;The impact is expected to be limited in common configurations, but may vary widely depending on what devices exist, how they are being used, how much knowledge an attacker has of the precise details of their use, and whether the user is likely to trust information that appears in a console. Accessing devices through refs is expected to be less dangerous than accessing them through filenames, since it is trivial to attempt to write arbitrary data using filenames.&lt;/p&gt;
&lt;p&gt;For attacks using the &lt;code&gt;CON&lt;/code&gt; or &lt;code&gt;CONOUT$&lt;/code&gt; device names, the greatest risk is if a command the user would not otherwise run, and would not be convinced to run by untrusted instructions, seems reasonable when a trusted application such as &lt;code&gt;gix&lt;/code&gt; appears to recommend it. The user may then be misled into running an attacker&apos;s command.&lt;/p&gt;
&lt;p&gt;A minor degradation in availability may also be possible, such as with a very large file named &lt;code&gt;CON&lt;/code&gt;, though the user could usually interrupt the application.&lt;/p&gt;
&lt;p id=&quot;license&quot; class=&quot;license&quot;&gt;Advisory available under &lt;a href=&quot;https://spdx.org/licenses/CC0-1.0.html&quot;&gt;CC0-1.0&lt;/a&gt;
license.
&lt;/p&gt;
&lt;/article&gt;</content></entry><entry><title>RUSTSEC-2024-0349: Vulnerability in gix-worktree</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0349.html</id><updated>2024-07-08T12:00:00+00:00</updated><category term="code-execution"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0349.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0349: Vulnerability in gix-worktree"/><published>2024-07-08T12:00:00+00:00</published><summary xml:lang="en">Traversal outside working tree enables arbitrary code execution</summary><content xml:lang="en" type="html"> &lt;article&gt;
&lt;span class=&quot;floating-menu&quot;&gt;
&lt;a href=&quot;https://github.com/RustSec/advisory-db/commits/main/crates/gix-worktree/RUSTSEC-2024-0349.md&quot;&gt;History&lt;/a&gt; ⋅
&lt;a href=&quot;https://github.com/RustSec/advisory-db/edit/main/crates/gix-worktree/RUSTSEC-2024-0349.md&quot;&gt;Edit&lt;/a&gt; ⋅
&lt;a href=&quot;https://api.osv.dev/v1/vulns/RUSTSEC-2024-0349&quot;&gt;JSON (OSV)&lt;/a&gt;
&lt;/span&gt;
&lt;header&gt;
&lt;h1&gt;
RUSTSEC-2024-0349
&lt;/h1&gt;
&lt;span class=&quot;subtitle&quot;&gt;&lt;p&gt;Traversal outside working tree enables arbitrary code execution&lt;/p&gt;
&lt;/span&gt;
&lt;/header&gt;
&lt;dl&gt;
&lt;dt id=&quot;reported&quot;&gt;Reported&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-05-22&quot;&gt;
May 22, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;issued&quot;&gt;Issued&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-08&quot;&gt;
July 8, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;package&quot;&gt;Package&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/packages/gix-worktree.html&quot;&gt;gix-worktree&lt;/a&gt;
(&lt;a href=&quot;https://crates.io/crates/gix-worktree&quot;&gt;crates.io&lt;/a&gt;)
&lt;/dd&gt;
&lt;dt id=&quot;type&quot;&gt;Type&lt;/dt&gt;
&lt;dd&gt;
Vulnerability
&lt;/dd&gt;
&lt;dt id=&quot;categories&quot;&gt;Categories&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/categories/code-execution.html&quot;&gt;code-execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;keywords&quot;&gt;Keywords&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/keywords/directory-traversal.html&quot;&gt;#directory-traversal&lt;/a&gt;
&lt;/dd&gt;
&lt;dt id=&quot;aliases&quot;&gt;Aliases&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-35186&quot;&gt;CVE-2024-35186&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/advisories/GHSA-7w47-3wg8-547c&quot;&gt;GHSA-7w47-3wg8-547c&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;details&quot;&gt;References&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/Byron/gitoxide/security/advisories/GHSA-7w47-3wg8-547c&quot;&gt;
https://github.com/Byron/gitoxide/security/advisories/GHSA-7w47-3wg8-547c
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/advisories/GHSA-7w47-3wg8-547c&quot;&gt;
https://github.com/advisories/GHSA-7w47-3wg8-547c
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://nvd.nist.gov/vuln/detail/CVE-2024-35186&quot;&gt;
https://nvd.nist.gov/vuln/detail/CVE-2024-35186
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;cvss_score&quot;&gt;CVSS Score&lt;/dt&gt;
&lt;dd&gt;8.8 &lt;span class=&quot;tag high&quot;&gt;
HIGH
&lt;/span&gt;&lt;/dd&gt;
&lt;dt id=&quot;cvss_details&quot;&gt;CVSS Details&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;Attack vector&lt;/dt&gt;&lt;dd&gt;Network&lt;/dd&gt;
&lt;dt&gt;Attack complexity&lt;/dt&gt;&lt;dd&gt;Low&lt;/d&gt;
&lt;dt&gt;Privileges required&lt;/dt&gt;&lt;dd&gt;None&lt;/dd&gt;
&lt;dt&gt;User interaction&lt;/dt&gt;&lt;dd&gt;Required&lt;/dd&gt;
&lt;dt&gt;Scope&lt;/dt&gt;&lt;dd&gt;Unchanged&lt;/dd&gt;
&lt;dt&gt;Confidentiality&lt;/dt&gt;&lt;dd&gt;High&lt;/dd&gt;
&lt;dt&gt;Integrity&lt;/dt&gt;&lt;dd&gt;High&lt;/dd&gt;
&lt;dt&gt;Availability&lt;/dt&gt;&lt;dd&gt;High&lt;/dd&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt id=&quot;cvss&quot;&gt;CVSS Vector&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H&quot;&gt;CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H&lt;/a&gt;&lt;/dd&gt;
&lt;dt id=&quot;patched&quot;&gt;Patched&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;gt;=0.34.0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id=&quot;description&quot;&gt;Description&lt;/h3&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;During checkout, gitoxide does not verify that paths point to locations in the working tree. A specially crafted repository can, when cloned, place new files anywhere writable by the application.&lt;/p&gt;
&lt;h3&gt;Details&lt;/h3&gt;
&lt;p&gt;Although &lt;code&gt;gix-worktree-state&lt;/code&gt; checks for collisions with existing files, it does not itself check if a path is really in the working tree when performing a checkout, nor do the path checks in &lt;code&gt;gix-fs&lt;/code&gt; and &lt;code&gt;gix-worktree&lt;/code&gt; prevent this. Cloning an untrusted repository containing specially crafted tree or blob names will create new files outside the repository, or inside the repository or a submodule&apos;s &lt;code&gt;.git&lt;/code&gt; directory. The simplest cases are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A tree named &lt;code&gt;..&lt;/code&gt; to traverse upward. This facilitates arbitrary code execution because files can be placed in one or more locations where they are likely to be executed soon.&lt;/li&gt;
&lt;li&gt;A tree named &lt;code&gt;.git&lt;/code&gt; to enter a &lt;code&gt;.git&lt;/code&gt; directory. This facilitates arbitrary code execution because hooks can be installed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A number of alternatives that achieve the same effect are also possible, some of which correspond to specific vulnerabilities that have affected Git in the past:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A tree or blob whose name contains one or more &lt;code&gt;/&lt;/code&gt;, to traverse upward or downward. For example, even without containing any tree named &lt;code&gt;..&lt;/code&gt; or &lt;code&gt;.git&lt;/code&gt;, a repository can represent a file named &lt;code&gt;../outside&lt;/code&gt; or &lt;code&gt;.git/hooks/pre-commit&lt;/code&gt;. This is distinct from the more intuitive case a repository containing trees that represent those paths.&lt;/li&gt;
&lt;li&gt;In Windows, a tree or blob whose name contains one or more &lt;code&gt;\&lt;/code&gt;, to traverse upward or downward. (Unlike &lt;code&gt;/&lt;/code&gt;, these are valid on other systems.) See &lt;a href=&quot;https://github.com/git/git/security/advisories/GHSA-xjx4-8694-q2fq&quot;&gt;GHSA-xjx4-8694-q2fq&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;On a case-insensitive filesystem (such as NTFS, APFS, or HFS+), a tree named as a case variant of &lt;code&gt;.git&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;On HFS+, a tree named like &lt;code&gt;.git&lt;/code&gt; or a case variant, with characters added that HFS+ ignores &lt;a href=&quot;https://developer.apple.com/library/archive/technotes/tn/tn1150.html#StringComparisonAlgorithm&quot;&gt;in collation&lt;/a&gt;. See https://github.com/git/git/commit/6162a1d323d24fd8cbbb1a6145a91fb849b2568f.&lt;/li&gt;
&lt;li&gt;On NTFS, a tree equivalent to &lt;code&gt;.git&lt;/code&gt; (or a case variant) by the use of &lt;a href=&quot;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/c54dec26-1551-4d3a-a0ea-4fa40f848eb3&quot;&gt;NTFS stream&lt;/a&gt; notation, such as &lt;code&gt;.git::$INDEX_ALLOCATION&lt;/code&gt;. See &lt;a href=&quot;https://github.com/git/git/security/advisories/GHSA-5wph-8frv-58vj&quot;&gt;GHSA-5wph-8frv-58vj&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;On an NTFS volume with &lt;a href=&quot;https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#short-vs-long-names&quot;&gt;8.3 aliasing&lt;/a&gt; enabled, a tree named as &lt;code&gt;git~1&lt;/code&gt; (or a case variant). See &lt;a href=&quot;https://github.com/git/git/security/advisories/GHSA-589j-mmg9-733v&quot;&gt;GHSA-589j-mmg9-733v&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When a checkout creates some files outside the repository directory but fails to complete, the repository directory is usually removed, but the outside files remain.&lt;/p&gt;
&lt;h3&gt;PoC&lt;/h3&gt;
&lt;p&gt;For simplicity, these examples stage a stand-in file with a valid name, modify the index, and commit. The instructions assume &lt;code&gt;sed&lt;/code&gt; supports &lt;code&gt;-i&lt;/code&gt;, which is the case on most systems. If using Windows, a Git Bash shell should be used.&lt;/p&gt;
&lt;h4&gt;Example: Downward traversal to install hooks&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Create a new repository with &lt;code&gt;git init dangerous-repo-installs-hook&lt;/code&gt; and &lt;code&gt;cd&lt;/code&gt; into the directory.&lt;/li&gt;
&lt;li&gt;Create the stand-in called &lt;code&gt;.git@hooks@pre-commit&lt;/code&gt;, with the &lt;em&gt;contents&lt;/em&gt;:
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;#!/bin/sh
printf &apos;Vulnerable!\n&apos;
date &amp;gt;vulnerable
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Stage the stand-in: &lt;code&gt;git add --chmod=+x .git@hooks@pre-commit&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Edit the index: &lt;code&gt;env LC_ALL=C sed -i.orig &apos;s|\.git@hooks@pre-commit|.git/hooks/pre-commit|&apos; .git/index&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Commit: &lt;code&gt;git commit -m &apos;Initial commit&apos;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Optionally&lt;/em&gt;, push to a private remote.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Then, on another or the same machine:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Clone the repository with a &lt;code&gt;gix clone …&lt;/code&gt; command.&lt;/li&gt;
&lt;li&gt;Enter the newly created directory.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Optionally&lt;/em&gt; run &lt;code&gt;ls -l .git/hooks&lt;/code&gt; to observe that the &lt;code&gt;pre-commit&lt;/code&gt; hook is already present.&lt;/li&gt;
&lt;li&gt;Make a new file and commit it with &lt;code&gt;git&lt;/code&gt;. This causes the payload surreptitiously installed as a &lt;code&gt;pre-commit&lt;/code&gt; hook to run, printing the message &lt;code&gt;Vulnerable!&lt;/code&gt; and creating a file in the current directory containing the current date and time.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note that the effect is not limited to modifying the current directory. The payload could be written to perform any action that the user who runs &lt;code&gt;git commit&lt;/code&gt; is capable of.&lt;/p&gt;
&lt;h4&gt;Example: Upward traversal to create a file above the working tree&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Create a new repository with &lt;code&gt;git init dangerous-repo-reaches-up&lt;/code&gt;, and &lt;code&gt;cd&lt;/code&gt; into the directory.&lt;/li&gt;
&lt;li&gt;Create the stand-in: &lt;code&gt;echo &apos;A file outside the working tree, somehow.&apos; &amp;gt;..@outside&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Stage the stand-in: &lt;code&gt;git add ..@outside&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Edit the index: &lt;code&gt;env LC_ALL=C sed -i.orig &apos;s|\.\.@outside|../outside|&apos; .git/index&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Commit: &lt;code&gt;git commit -m &apos;Initial commit&apos;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Optionally&lt;/em&gt;, push to a private remote.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Then, as above, on the same or another machine, clone the repository with a &lt;code&gt;gix clone …&lt;/code&gt; command. Observe that a file named &lt;code&gt;outside&lt;/code&gt; is present alongside (not inside) the cloned directory.&lt;/p&gt;
&lt;h3&gt;Impact&lt;/h3&gt;
&lt;p&gt;Any use of &lt;code&gt;gix&lt;/code&gt; or another application that makes use of &lt;code&gt;gix-worktree-state&lt;/code&gt;, or otherwise relies on &lt;code&gt;gix-fs&lt;/code&gt; and &lt;code&gt;gix-worktree&lt;/code&gt; for validation, is affected, if used to clone untrusted repositories. The above description focuses on code execution, as that leads to a complete loss of confidentiality, integrity, and availability, but creating files outside a working tree without attempting to execute code can directly impact integrity as well.&lt;/p&gt;
&lt;p&gt;In use cases where no untrusted repository is ever cloned, this vulnerability has no impact. Furthermore, the impact of this vulnerability &lt;em&gt;may&lt;/em&gt; be lower when &lt;code&gt;gix&lt;/code&gt; is used to clone a repository for CI/CD purposes, even if untrusted, since in such uses the environment is usually isolated and arbitrary code is usually run deliberately from the repository with necessary safeguards in place.&lt;/p&gt;
&lt;p id=&quot;license&quot; class=&quot;license&quot;&gt;Advisory available under &lt;a href=&quot;https://spdx.org/licenses/CC0-1.0.html&quot;&gt;CC0-1.0&lt;/a&gt;
license.
&lt;/p&gt;
&lt;/article&gt;</content></entry><entry><title>RUSTSEC-2024-0348: Vulnerability in gix-index</title><id>https://rustsec.org/advisories/RUSTSEC-2024-0348.html</id><updated>2024-07-08T12:00:00+00:00</updated><category term="code-execution"/><link href="https://rustsec.org/advisories/RUSTSEC-2024-0348.html" rel="alternate" type="text/html" title="RUSTSEC-2024-0348: Vulnerability in gix-index"/><published>2024-07-08T12:00:00+00:00</published><summary xml:lang="en">Traversal outside working tree enables arbitrary code execution</summary><content xml:lang="en" type="html"> &lt;article&gt;
&lt;span class=&quot;floating-menu&quot;&gt;
&lt;a href=&quot;https://github.com/RustSec/advisory-db/commits/main/crates/gix-index/RUSTSEC-2024-0348.md&quot;&gt;History&lt;/a&gt; ⋅
&lt;a href=&quot;https://github.com/RustSec/advisory-db/edit/main/crates/gix-index/RUSTSEC-2024-0348.md&quot;&gt;Edit&lt;/a&gt; ⋅
&lt;a href=&quot;https://api.osv.dev/v1/vulns/RUSTSEC-2024-0348&quot;&gt;JSON (OSV)&lt;/a&gt;
&lt;/span&gt;
&lt;header&gt;
&lt;h1&gt;
RUSTSEC-2024-0348
&lt;/h1&gt;
&lt;span class=&quot;subtitle&quot;&gt;&lt;p&gt;Traversal outside working tree enables arbitrary code execution&lt;/p&gt;
&lt;/span&gt;
&lt;/header&gt;
&lt;dl&gt;
&lt;dt id=&quot;reported&quot;&gt;Reported&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-05-22&quot;&gt;
May 22, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;issued&quot;&gt;Issued&lt;/dt&gt;
&lt;dd&gt;
&lt;time datetime=&quot;2024-07-08&quot;&gt;
July 8, 2024
&lt;/time&gt;
&lt;/dd&gt;
&lt;dt id=&quot;package&quot;&gt;Package&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/packages/gix-index.html&quot;&gt;gix-index&lt;/a&gt;
(&lt;a href=&quot;https://crates.io/crates/gix-index&quot;&gt;crates.io&lt;/a&gt;)
&lt;/dd&gt;
&lt;dt id=&quot;type&quot;&gt;Type&lt;/dt&gt;
&lt;dd&gt;
Vulnerability
&lt;/dd&gt;
&lt;dt id=&quot;categories&quot;&gt;Categories&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/categories/code-execution.html&quot;&gt;code-execution&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;keywords&quot;&gt;Keywords&lt;/dt&gt;
&lt;dd&gt;
&lt;a href=&quot;/keywords/directory-traversal.html&quot;&gt;#directory-traversal&lt;/a&gt;
&lt;/dd&gt;
&lt;dt id=&quot;aliases&quot;&gt;Aliases&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-35186&quot;&gt;CVE-2024-35186&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/advisories/GHSA-7w47-3wg8-547c&quot;&gt;GHSA-7w47-3wg8-547c&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;details&quot;&gt;References&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/Byron/gitoxide/security/advisories/GHSA-7w47-3wg8-547c&quot;&gt;
https://github.com/Byron/gitoxide/security/advisories/GHSA-7w47-3wg8-547c
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://github.com/advisories/GHSA-7w47-3wg8-547c&quot;&gt;
https://github.com/advisories/GHSA-7w47-3wg8-547c
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://nvd.nist.gov/vuln/detail/CVE-2024-35186&quot;&gt;
https://nvd.nist.gov/vuln/detail/CVE-2024-35186
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt id=&quot;cvss_score&quot;&gt;CVSS Score&lt;/dt&gt;
&lt;dd&gt;8.8 &lt;span class=&quot;tag high&quot;&gt;
HIGH
&lt;/span&gt;&lt;/dd&gt;
&lt;dt id=&quot;cvss_details&quot;&gt;CVSS Details&lt;/dt&gt;
&lt;dd&gt;
&lt;dl&gt;
&lt;dt&gt;Attack vector&lt;/dt&gt;&lt;dd&gt;Network&lt;/dd&gt;
&lt;dt&gt;Attack complexity&lt;/dt&gt;&lt;dd&gt;Low&lt;/d&gt;
&lt;dt&gt;Privileges required&lt;/dt&gt;&lt;dd&gt;None&lt;/dd&gt;
&lt;dt&gt;User interaction&lt;/dt&gt;&lt;dd&gt;Required&lt;/dd&gt;
&lt;dt&gt;Scope&lt;/dt&gt;&lt;dd&gt;Unchanged&lt;/dd&gt;
&lt;dt&gt;Confidentiality&lt;/dt&gt;&lt;dd&gt;High&lt;/dd&gt;
&lt;dt&gt;Integrity&lt;/dt&gt;&lt;dd&gt;High&lt;/dd&gt;
&lt;dt&gt;Availability&lt;/dt&gt;&lt;dd&gt;High&lt;/dd&gt;
&lt;/dl&gt;
&lt;/dd&gt;
&lt;dt id=&quot;cvss&quot;&gt;CVSS Vector&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H&quot;&gt;CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H&lt;/a&gt;&lt;/dd&gt;
&lt;dt id=&quot;patched&quot;&gt;Patched&lt;/dt&gt;
&lt;dd&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;gt;=0.33.0&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id=&quot;description&quot;&gt;Description&lt;/h3&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;During checkout, gitoxide does not verify that paths point to locations in the working tree. A specially crafted repository can, when cloned, place new files anywhere writable by the application.&lt;/p&gt;
&lt;h3&gt;Details&lt;/h3&gt;
&lt;p&gt;Although &lt;code&gt;gix-worktree-state&lt;/code&gt; checks for collisions with existing files, it does not itself check if a path is really in the working tree when performing a checkout, nor do the path checks in &lt;code&gt;gix-fs&lt;/code&gt; and &lt;code&gt;gix-worktree&lt;/code&gt; prevent this. Cloning an untrusted repository containing specially crafted tree or blob names will create new files outside the repository, or inside the repository or a submodule&apos;s &lt;code&gt;.git&lt;/code&gt; directory. The simplest cases are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A tree named &lt;code&gt;..&lt;/code&gt; to traverse upward. This facilitates arbitrary code execution because files can be placed in one or more locations where they are likely to be executed soon.&lt;/li&gt;
&lt;li&gt;A tree named &lt;code&gt;.git&lt;/code&gt; to enter a &lt;code&gt;.git&lt;/code&gt; directory. This facilitates arbitrary code execution because hooks can be installed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A number of alternatives that achieve the same effect are also possible, some of which correspond to specific vulnerabilities that have affected Git in the past:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A tree or blob whose name contains one or more &lt;code&gt;/&lt;/code&gt;, to traverse upward or downward. For example, even without containing any tree named &lt;code&gt;..&lt;/code&gt; or &lt;code&gt;.git&lt;/code&gt;, a repository can represent a file named &lt;code&gt;../outside&lt;/code&gt; or &lt;code&gt;.git/hooks/pre-commit&lt;/code&gt;. This is distinct from the more intuitive case a repository containing trees that represent those paths.&lt;/li&gt;
&lt;li&gt;In Windows, a tree or blob whose name contains one or more &lt;code&gt;\&lt;/code&gt;, to traverse upward or downward. (Unlike &lt;code&gt;/&lt;/code&gt;, these are valid on other systems.) See &lt;a href=&quot;https://github.com/git/git/security/advisories/GHSA-xjx4-8694-q2fq&quot;&gt;GHSA-xjx4-8694-q2fq&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;On a case-insensitive filesystem (such as NTFS, APFS, or HFS+), a tree named as a case variant of &lt;code&gt;.git&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;On HFS+, a tree named like &lt;code&gt;.git&lt;/code&gt; or a case variant, with characters added that HFS+ ignores &lt;a href=&quot;https://developer.apple.com/library/archive/technotes/tn/tn1150.html#StringComparisonAlgorithm&quot;&gt;in collation&lt;/a&gt;. See https://github.com/git/git/commit/6162a1d323d24fd8cbbb1a6145a91fb849b2568f.&lt;/li&gt;
&lt;li&gt;On NTFS, a tree equivalent to &lt;code&gt;.git&lt;/code&gt; (or a case variant) by the use of &lt;a href=&quot;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/c54dec26-1551-4d3a-a0ea-4fa40f848eb3&quot;&gt;NTFS stream&lt;/a&gt; notation, such as &lt;code&gt;.git::$INDEX_ALLOCATION&lt;/code&gt;. See &lt;a href=&quot;https://github.com/git/git/security/advisories/GHSA-5wph-8frv-58vj&quot;&gt;GHSA-5wph-8frv-58vj&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;On an NTFS volume with &lt;a href=&quot;https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#short-vs-long-names&quot;&gt;8.3 aliasing&lt;/a&gt; enabled, a tree named as &lt;code&gt;git~1&lt;/code&gt; (or a case variant). See &lt;a href=&quot;https://github.com/git/git/security/advisories/GHSA-589j-mmg9-733v&quot;&gt;GHSA-589j-mmg9-733v&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When a checkout creates some files outside the repository directory but fails to complete, the repository directory is usually removed, but the outside files remain.&lt;/p&gt;
&lt;h3&gt;PoC&lt;/h3&gt;
&lt;p&gt;For simplicity, these examples stage a stand-in file with a valid name, modify the index, and commit. The instructions assume &lt;code&gt;sed&lt;/code&gt; supports &lt;code&gt;-i&lt;/code&gt;, which is the case on most systems. If using Windows, a Git Bash shell should be used.&lt;/p&gt;
&lt;h4&gt;Example: Downward traversal to install hooks&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Create a new repository with &lt;code&gt;git init dangerous-repo-installs-hook&lt;/code&gt; and &lt;code&gt;cd&lt;/code&gt; into the directory.&lt;/li&gt;
&lt;li&gt;Create the stand-in called &lt;code&gt;.git@hooks@pre-commit&lt;/code&gt;, with the &lt;em&gt;contents&lt;/em&gt;:
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;#!/bin/sh
printf &apos;Vulnerable!\n&apos;
date &amp;gt;vulnerable
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Stage the stand-in: &lt;code&gt;git add --chmod=+x .git@hooks@pre-commit&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Edit the index: &lt;code&gt;env LC_ALL=C sed -i.orig &apos;s|\.git@hooks@pre-commit|.git/hooks/pre-commit|&apos; .git/index&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Commit: &lt;code&gt;git commit -m &apos;Initial commit&apos;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Optionally&lt;/em&gt;, push to a private remote.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Then, on another or the same machine:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Clone the repository with a &lt;code&gt;gix clone …&lt;/code&gt; command.&lt;/li&gt;
&lt;li&gt;Enter the newly created directory.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Optionally&lt;/em&gt; run &lt;code&gt;ls -l .git/hooks&lt;/code&gt; to observe that the &lt;code&gt;pre-commit&lt;/code&gt; hook is already present.&lt;/li&gt;
&lt;li&gt;Make a new file and commit it with &lt;code&gt;git&lt;/code&gt;. This causes the payload surreptitiously installed as a &lt;code&gt;pre-commit&lt;/code&gt; hook to run, printing the message &lt;code&gt;Vulnerable!&lt;/code&gt; and creating a file in the current directory containing the current date and time.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note that the effect is not limited to modifying the current directory. The payload could be written to perform any action that the user who runs &lt;code&gt;git commit&lt;/code&gt; is capable of.&lt;/p&gt;
&lt;h4&gt;Example: Upward traversal to create a file above the working tree&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Create a new repository with &lt;code&gt;git init dangerous-repo-reaches-up&lt;/code&gt;, and &lt;code&gt;cd&lt;/code&gt; into the directory.&lt;/li&gt;
&lt;li&gt;Create the stand-in: &lt;code&gt;echo &apos;A file outside the working tree, somehow.&apos; &amp;gt;..@outside&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Stage the stand-in: &lt;code&gt;git add ..@outside&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Edit the index: &lt;code&gt;env LC_ALL=C sed -i.orig &apos;s|\.\.@outside|../outside|&apos; .git/index&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Commit: &lt;code&gt;git commit -m &apos;Initial commit&apos;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Optionally&lt;/em&gt;, push to a private remote.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Then, as above, on the same or another machine, clone the repository with a &lt;code&gt;gix clone …&lt;/code&gt; command. Observe that a file named &lt;code&gt;outside&lt;/code&gt; is present alongside (not inside) the cloned directory.&lt;/p&gt;
&lt;h3&gt;Impact&lt;/h3&gt;
&lt;p&gt;Any use of &lt;code&gt;gix&lt;/code&gt; or another application that makes use of &lt;code&gt;gix-worktree-state&lt;/code&gt;, or otherwise relies on &lt;code&gt;gix-fs&lt;/code&gt; and &lt;code&gt;gix-worktree&lt;/code&gt; for validation, is affected, if used to clone untrusted repositories. The above description focuses on code execution, as that leads to a complete loss of confidentiality, integrity, and availability, but creating files outside a working tree without attempting to execute code can directly impact integrity as well.&lt;/p&gt;
&lt;p&gt;In use cases where no untrusted repository is ever cloned, this vulnerability has no impact. Furthermore, the impact of this vulnerability &lt;em&gt;may&lt;/em&gt; be lower when &lt;code&gt;gix&lt;/code&gt; is used to clone a repository for CI/CD purposes, even if untrusted, since in such uses the environment is usually isolated and arbitrary code is usually run deliberately from the repository with necessary safeguards in place.&lt;/p&gt;
&lt;p id=&quot;license&quot; class=&quot;license&quot;&gt;Advisory available under &lt;a href=&quot;https://spdx.org/licenses/CC0-1.0.html&quot;&gt;CC0-1.0&lt;/a&gt;
license.
&lt;/p&gt;
&lt;/article&gt;</content></entry></feed>