{"id":"GHSA-5rq4-664w-9x2c","revision":null,"records":[{"revision":"579824e88b5145c29eb5209bec10c670","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-27699","aliases":[],"title":"Basic FTP has Path Traversal Vulnerability in its downloadToDir() method","description":"The `basic-ftp` FTP client library for Node.js contains a path traversal vulnerability (CWE-22) in versions prior to 5.2.0 in the `downloadToDir()`\u00A0method. A malicious FTP server can send directory listings with filenames containing path traversal sequences (`../`) that cause files to be written outside the intended download directory. Version 5.2.0 patches the issue.","state":0,"publishedAt":"2026-02-25T14:58:56.815+00:00","modifiedAt":"2026-02-27T17:04:33.751+00:00","affected":[{"ecosystem":"Vendor product","name":"basic-ftp","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"patrickjuchli\",\n                    \"product\": \"basic-ftp\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 5.2.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","score":9.1,"severity":"CRITICAL"}],"references":["https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5rq4-664w-9x2c","https://github.com/patrickjuchli/basic-ftp/commit/2a2a0e6514357b9eda07c2f8afbd3f04727a7cd9","https://github.com/patrickjuchli/basic-ftp/releases/tag/v5.2.0"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-27699","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-27699","identifiers":["CVE-2026-27699"]},"retained":false,"historicalAffected":[]},{"revision":"4f37a885fefb4732956e18d1ab2ebcae","observedAt":"2026-11-15T09:27:19.863+00:00","statement":{"source":"euvd","id":"EUVD-2026-8643","aliases":["CVE-2026-27699","GHSA-5rq4-664w-9x2c"],"title":"The `basic-ftp` FTP client library for Node.js contains a path traversal vulnerability (CWE-22) in versions prior to 5.2.0 in the `downloadToDir()`\u00A0method. A malicious FTP server can send directory listings with filenames containing path tr…","description":"The `basic-ftp` FTP client library for Node.js contains a path traversal vulnerability (CWE-22) in versions prior to 5.2.0 in the `downloadToDir()`\u00A0method. A malicious FTP server can send directory listings with filenames containing path traversal sequences (`../`) that cause files to be written outside the intended download directory. Version 5.2.0 patches the issue.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","score":9.1,"severity":null}],"references":["https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5rq4-664w-9x2c","https://github.com/patrickjuchli/basic-ftp/commit/2a2a0e6514357b9eda07c2f8afbd3f04727a7cd9","https://github.com/patrickjuchli/basic-ftp/releases/tag/v5.2.0"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-8643","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Feb 25, 2026, 2:58:56 PM","dateUpdated":"Feb 27, 2026, 5:04:33 PM"},"relatedAdvisories":[{"id":"openSUSE-SU-2026:11452-1","title":"agama-integration-tests-1785848065.5562c7c-4.1 on GA media","vulnerabilityIds":["CVE-2026-13149","CVE-2026-27699","CVE-2026-48779","CVE-2026-53550"]},{"id":"WID-SEC-W-2026-3046","title":"IBM Concert: Mehrere Schwachstellen","vulnerabilityIds":["CVE-2019-19921","CVE-2021-23337","CVE-2024-3651","CVE-2024-39338","CVE-2024-45590","CVE-2025-13465","CVE-2025-15284","CVE-2025-15599","CVE-2025-22874","CVE-2025-47273","CVE-2025-47907","CVE-2025-52881","CVE-2025-53643","CVE-2025-55184","CVE-2025-58056","CVE-2025-58188","CVE-2025-58189","CVE-2025-61723","CVE-2025-61730","CVE-2025-64649","CVE-2025-64756","CVE-2025-67221","CVE-2025-68121","CVE-2025-68146","CVE-2026-0540","CVE-2026-2327","CVE-2026-23490","CVE-2026-23897","CVE-2026-2391","CVE-2026-23949","CVE-2026-24486","CVE-2026-25528","CVE-2026-25547","CVE-2026-25639","CVE-2026-25990","CVE-2026-26007","CVE-2026-26019","CVE-2026-26996","CVE-2026-27142","CVE-2026-27212","CVE-2026-27699","CVE-2026-27903","CVE-2026-27904","CVE-2026-28684","CVE-2026-29063","CVE-2026-29181","CVE-2026-2950","CVE-2026-31808","CVE-2026-31900","CVE-2026-32274","CVE-2026-32288","CVE-2026-32597","CVE-2026-32630","CVE-2026-32887","CVE-2026-32952","CVE-2026-33186","CVE-2026-33532","CVE-2026-33750","CVE-2026-33814","CVE-2026-33816","CVE-2026-33916","CVE-2026-34043","CVE-2026-34073","CVE-2026-34077","CVE-2026-3520","CVE-2026-35469","CVE-2026-35515","CVE-2026-3627","CVE-2026-39823","CVE-2026-39825","CVE-2026-39826","CVE-2026-39892","CVE-2026-39984","CVE-2026-40175","CVE-2026-40179","CVE-2026-40181","CVE-2026-40190","CVE-2026-40347","CVE-2026-41066","CVE-2026-41182","CVE-2026-41238","CVE-2026-41239","CVE-2026-41240","CVE-2026-41305","CVE-2026-41324","CVE-2026-41425","CVE-2026-41481","CVE-2026-41488","CVE-2026-41602","CVE-2026-41636","CVE-2026-42151","CVE-2026-42154","CVE-2026-42198","CVE-2026-42211","CVE-2026-42338","CVE-2026-42342","CVE-2026-42561","CVE-2026-42577","CVE-2026-43870","CVE-2026-44405","CVE-2026-44431","CVE-2026-44432","CVE-2026-44486","CVE-2026-44487","CVE-2026-44488","CVE-2026-44492","CVE-2026-44494","CVE-2026-44496","CVE-2026-44728","CVE-2026-4539","CVE-2026-45409","CVE-2026-45736","CVE-2026-46625","CVE-2026-4800","CVE-2026-4923","CVE-2026-4926","CVE-2026-7246","CVE-2026-8723"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-8643","identifiers":["EUVD-2026-8643","CVE-2026-27699","GHSA-5rq4-664w-9x2c"]},"retained":false,"historicalAffected":[]},{"revision":"5e3ee1f2920a488196e4b44636b6ab0a","observedAt":"2026-10-25T06:17:33.365+00:00","statement":{"source":"nvd","id":"CVE-2026-27699","aliases":[],"title":"The `basic-ftp` FTP client library for Node.js contains a path traversal vulnerability (CWE-22) in versions prior to 5.2.0 in the `downloadToDir()`\u00A0method. A malicious FTP server can send directory listings with filenames containing path tr…","description":"The `basic-ftp` FTP client library for Node.js contains a path traversal vulnerability (CWE-22) in versions prior to 5.2.0 in the `downloadToDir()`\u00A0method. A malicious FTP server can send directory listings with filenames containing path traversal sequences (`../`) that cause files to be written outside the intended download directory. Version 5.2.0 patches the issue.","state":0,"publishedAt":"2026-02-25T15:20:53.523+00:00","modifiedAt":"2026-06-17T10:27:32.287+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","score":9.1,"severity":"CRITICAL"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"severity":"CRITICAL"}],"references":["https://github.com/patrickjuchli/basic-ftp/commit/2a2a0e6514357b9eda07c2f8afbd3f04727a7cd9","https://github.com/patrickjuchli/basic-ftp/releases/tag/v5.2.0","https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5rq4-664w-9x2c"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-27699","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-22"],"productCriteria":["cpe:2.3:a:patrickjuchli:basic-ftp:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2026-02-25T15:20:53.523","lastModified":"2026-06-17T10:27:32.287"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-27699","identifiers":["CVE-2026-27699"]},"retained":false,"historicalAffected":[]},{"revision":"6db4f81cc79146c0a6a54ed30e80423e","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-5rq4-664w-9x2c","aliases":["CVE-2026-27699"],"title":"Basic FTP has Path Traversal Vulnerability in its downloadToDir()\u00A0method","description":"The `basic-ftp`\u00A0library contains a path traversal vulnerability in the `downloadToDir()`\u00A0method. A malicious FTP server can send directory listings with filenames containing path traversal sequences (`../`) that cause files to be written outside the intended download directory.\n\n\n## Source-to-Sink Flow\n\n```\n1. SOURCE: FTP server sends LIST response\n└─> \"-rw-r--r-- 1 user group 1024 Jan 20 12:00 ../../../etc/passwd\"\n\n2. PARSER: parseListUnix.ts:100 extracts filename\n└─> file.name = \"../../../etc/passwd\"\n\n3. VALIDATION: parseListUnix.ts:101 checks\n└─> if (name === \".\" || name === \"..\") ❌ (only filters exact matches)\n└─> \"../../../etc/passwd\" !== \".\" && !== \"..\" ✅ PASSES\n\n4. SINK: Client.ts:707 uses filename directly\n└─> const localPath = join(localDirPath, file.name)\n└─> join(\"/safe/download\", \"../../../etc/passwd\")\n└─> Result: \"/safe/download/../../../etc/passwd\" → resolves to \"/etc/passwd\"\n\n5. FILE WRITE: Client.ts:512 opens file\n└─> fsOpen(localPath, \"w\") → writes to /etc/passwd (outside intended directory)\n```\n\n## Vulnerable Code\n\n**File**: `src/Client.ts:707`\n\n```typescript\nprotected async _downloadFromWorkingDir(localDirPath: string): Promise<void>\u00A0{\nawait ensureLocalDirectory(localDirPath)\nfor\u00A0(const file of await\u00A0this.list()) {\nconst localPath = join(localDirPath, file.name) // ⚠️ VULNERABLE\n// file.name comes from untrusted FTP server, no sanitization\nawait this.downloadTo(localPath, file.name)\n}\n}\n```\n\n**Root Cause**:\n-\u00A0Parser validation (`parseListUnix.ts:101`) only filters exact `.`\u00A0or `..`\u00A0entries\n-\u00A0No sanitization of `../`\u00A0sequences in filenames\n- `path.join()`\u00A0doesn't prevent traversal, `fs.open()`\u00A0resolves paths\n\n\n# Impact\n\nA malicious FTP server can:\n-\u00A0Write files to arbitrary locations on the client filesystem\n-\u00A0Overwrite critical system files (if user has write access)\n-\u00A0Potentially achieve remote code execution\n\n## Affected Versions\n\n- **Tested**: v5.1.0\n- **Likely**: All versions (code pattern exists since initial implementation)\n\n## Mitigation\n\n**Workaround**: Do not use `downloadToDir()`\u00A0with untrusted FTP servers.\n\n**Fix**: Sanitize filenames before use:\n\n```typescript\nimport\u00A0{ basename\u00A0} from 'path'\n\n// In _downloadFromWorkingDir:\nconst sanitizedName = basename(file.name) // Strip path components\nconst localPath = join(localDirPath, sanitizedName)\n```","state":0,"publishedAt":"2026-02-25T22:34:26+00:00","modifiedAt":"2026-09-10T03:50:34.1557008+00:00","affected":[{"ecosystem":"npm","name":"basic-ftp","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"5.2.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/patrickjuchli/basic-ftp/security/advisories/GHSA-5rq4-664w-9x2c","https://nvd.nist.gov/vuln/detail/CVE-2026-27699","https://github.com/patrickjuchli/basic-ftp/commit/2a2a0e6514357b9eda07c2f8afbd3f04727a7cd9","https://github.com/patrickjuchli/basic-ftp","https://github.com/patrickjuchli/basic-ftp/releases/tag/v5.2.0"],"sourceUrl":"https://github.com/advisories/GHSA-5rq4-664w-9x2c","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-5rq4-664w-9x2c","identifiers":["GHSA-5rq4-664w-9x2c","CVE-2026-27699"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-16T10:48:45.9101051+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-16T10:48:45.9101051+00:00","lastSuccessAt":"2026-11-16T10:48:46.1830858+00:00","error":null,"lastVerifiedAt":"2026-11-16T10:48:46.1832507+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-6be044d0e08779dadd136f949a536de4047af96f5d7bceb7e190ecffbb8f18ca-8a2fb18648ff358ebb4ff6bb6ffbcbbf9a6d9924b79a3366457211ee702ea8e6","complete":true,"records":425914,"lastAttemptAt":"2026-11-16T10:48:44.5566336+00:00","lastSuccessAt":"2026-11-16T10:30:46.3953397+00:00","error":null,"lastVerifiedAt":"2026-11-16T10:48:44.5566336+00:00","snapshotPublishedAt":"2026-11-16T10:20:49+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-65ed5f72e9cf4d7d944fddd792d50665","complete":false,"records":13821,"lastAttemptAt":"2026-11-16T10:49:25.2893343+00:00","lastSuccessAt":"2026-11-16T10:31:57.938+00:00","error":"10 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T10:31:57.938+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13864,"expectedIdentifiers":13874,"failedIdentifiers":10},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-16T10:48:45.9101051+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-16T10:48:45.9101051+00:00","lastSuccessAt":"2026-11-16T10:48:46.2116722+00:00","error":null,"lastVerifiedAt":"2026-11-16T10:48:46.2116735+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-2ba38d05bb1546de90213bfd54e35782","complete":false,"records":13833,"lastAttemptAt":"2026-11-16T10:49:24.6566682+00:00","lastSuccessAt":"2026-11-16T10:49:24.653+00:00","error":"300 identifier lookups failed; latest failures include HttpError (HTTP 503). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T10:49:24.653+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13574,"expectedIdentifiers":13874,"failedIdentifiers":300},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-16T10:48:45.6295903+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-16T10:48:45.6295903+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-16T10:48:45.1353373+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-16T10:48:45.1353373+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-16T10:48:45.7344238+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-16T10:48:45.7344238+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-263d9c8d63997345727b11314d9b9377eba9fd4146f04497c069a15e332b60cb","complete":true,"records":232482,"lastAttemptAt":"2026-11-16T10:48:45.2410202+00:00","lastSuccessAt":"2026-11-16T07:32:30.5701252+00:00","error":null,"lastVerifiedAt":"2026-11-16T10:48:45.2410202+00:00","snapshotPublishedAt":"2026-11-16T06:48:00+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}