🔍 CVE-2026-39983

8.6
CVSS Score
HIGH
2026-04-09
2026-10-26 22:10
✅ 완료

🇰🇷 한글 설명

basic-ftp 라이브러리는 파일 경로에 포함된 CRLF 시퀀스(\r\n)를 검증하지 않아 FTP 명령어 주입 공격에 취약합니다. 공격자가 경로 매개변수에 특수문자를 삽입하여 여러 FTP 명령을 실행할 수 있으며, 버전 5.2.1부터 이 문제가 해결되었습니다.

💡 쉬운 설명

FTP 클라이언트 라이브러리가 파일 경로를 검증 없이 그대로 전송하여, 공격자가 경로에 특수문자를 넣으면 의도한 것 외 다른 명령어가 실행될 수 있습니다. 예를 들어 파일 삭제 요청에 몰래 명령어를 숨겨서 추가 작업을 수행하게 할 수 있습니다.

🇺🇸 원문 (English)

basic-ftp is an FTP client for Node.js. Prior to 5.2.1, basic-ftp allows FTP command injection via CRLF sequences (\r\n) in file path parameters passed to high-level path APIs such as cd(), remove(), rename(), uploadFrom(), downloadTo(), list(), and removeDir(). The library's protectWhitespace() helper only handles leading spaces and returns other paths unchanged, while FtpContext.send() writes the resulting command string directly to the control socket with \r\n appended. This lets attacker-controlled path strings split one intended FTP command into multiple commands. This vulnerability is fixed in 5.2.1.

📍 영향받는 시스템

basic-ftp Node.js 패키지 5.2.0 이하

⚔️ 공격 벡터

cd(), remove(), rename(), uploadFrom(), downloadTo(), list(), removeDir() 등의 API에 CRLF 시퀀스가 포함된 파일 경로를 전달하여 FTP 명령어 주입

🛡️ 대응 방법

basic-ftp를 5.2.1 이상으로 업그레이드 (npm install --save basic-ftp@>=5.2.1)

🔧 검증 코드

5.2.1 이상이면 안전함. 5.2.0 이하이면 즉시 업그레이드 필요

Shell / Script
npm list basic-ftp 2>/dev/null | grep basic-ftp

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L

💻 영향받는 소프트웨어

Node.js