<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://db.gcve.eu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Thu, 08 Oct 2026 21:40:33 +0000</lastBuildDate>
    <item>
      <title>GHSA-6v7q-wjvx-w8wg — basic-ftp: Incomplete CRLF Injection Protection Allows Arbitrary FTP Command Execution via Credentials and MKD Commands</title>
      <link>https://db.gcve.eu/vuln/ghsa-6v7q-wjvx-w8wg</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: basic-ftp&lt;/p&gt;
&lt;p&gt;## Summary&lt;/p&gt;
&lt;p&gt;basic-ftp&amp;#39;s CRLF injection protection (added in commit 2ecc8e2 for GHSA-chqc-8p9q-pq6q) is incomplete. Two code paths bypass the `protectWhitespace()` control character check: (1) the `login()` method directly concatenates user-supplied credentials into USER/PASS FTP commands without any validation, and (2) the `_openDir()` method sends an MKD command before `cd()` invokes `protectWhitespace()`, creating a TOCTOU bypass. Both vectors allow an attacker who controls input to inject arbitrary FTP commands into the control connection.&lt;/p&gt;
&lt;p&gt;## Details&lt;/p&gt;
&lt;p&gt;### Vector 1: Credential Injection (login)&lt;/p&gt;
&lt;p&gt;The `login()` method constructs FTP commands by direct string concatenation with no CRLF validation:&lt;/p&gt;
&lt;p&gt;```typescript
// src/Client.ts:216-231
login(user = &amp;#34;anonymous&amp;#34;, password = &amp;#34;guest&amp;#34;): Promise&amp;lt;FTPResponse&amp;gt; {
    this.ftp.log(`Login security: ${describeTLS(this.ftp.socket)}`)
    return this.ftp.handle(&amp;#34;USER &amp;#34; + user, (res, task) =&amp;gt; {  // Line 218: no validation on `user`
        // ...
        else if (res.code === 331) {
            this.ftp.send(&amp;#34;PASS &amp;#34; + password)  // Line 226: no validation on `password`
        }
    })
}
```&lt;/p&gt;
&lt;p&gt;`FtpContext.send()` writes directly to the TCP socket:&lt;/p&gt;
&lt;p&gt;```typescript
// src/FtpContext.ts:223-227
send(command: string) {
    // ...
    this._socket.write(command + &amp;#34;\r\n&amp;#34;, this.encoding)
}
```&lt;/p&gt;
&lt;p&gt;The `protectWhitespace()` method (line 762) rejects `\r`, `\n`, and `\0` characters — but it is only called for path-based operations. Credentials never pa…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: basic-ftp&lt;/p&gt;
&lt;p&gt;## Summary&lt;/p&gt;
&lt;p&gt;basic-ftp&amp;#39;s CRLF injection protection (added in commit 2ecc8e2 for GHSA-chqc-8p9q-pq6q) is incomplete. Two code paths bypass the `protectWhitespace()` control character check: (1) the `login()` method directly concatenates user-supplied credentials into USER/PASS FTP commands without any validation, and (2) the `_openDir()` method sends an MKD command before `cd()` invokes `protectWhitespace()`, creating a TOCTOU bypass. Both vectors allow an attacker who controls input to inject arbitrary FTP commands into the control connection.&lt;/p&gt;
&lt;p&gt;## Details&lt;/p&gt;
&lt;p&gt;### Vector 1: Credential Injection (login)&lt;/p&gt;
&lt;p&gt;The `login()` method constructs FTP commands by direct string concatenation with no CRLF validation:&lt;/p&gt;
&lt;p&gt;```typescript
// src/Client.ts:216-231
login(user = &amp;#34;anonymous&amp;#34;, password = &amp;#34;guest&amp;#34;): Promise&amp;lt;FTPResponse&amp;gt; {
    this.ftp.log(`Login security: ${describeTLS(this.ftp.socket)}`)
    return this.ftp.handle(&amp;#34;USER &amp;#34; + user, (res, task) =&amp;gt; {  // Line 218: no validation on `user`
        // ...
        else if (res.code === 331) {
            this.ftp.send(&amp;#34;PASS &amp;#34; + password)  // Line 226: no validation on `password`
        }
    })
}
```&lt;/p&gt;
&lt;p&gt;`FtpContext.send()` writes directly to the TCP socket:&lt;/p&gt;
&lt;p&gt;```typescript
// src/FtpContext.ts:223-227
send(command: string) {
    // ...
    this._socket.write(command + &amp;#34;\r\n&amp;#34;, this.encoding)
}
```&lt;/p&gt;
&lt;p&gt;The `protectWhitespace()` method (line 762) rejects `\r`, `\n`, and `\0` characters — but it is only called for path-based operations. Credentials never pa…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/ghsa-6v7q-wjvx-w8wg</guid>
    </item>
  </channel>
</rss>
