{"id":"CVE-2023-27534","aliases":["CVE-2023-27534","CURL-CVE-2023-27534"],"related":[],"kind":"vulnerability","state":"published","title":"SFTP path ~ resolving discrepancy","summary":"A path traversal vulnerability exists in curl <8.0.0 SFTP implementation causes the tilde (~) character to be wrongly replaced when used as a prefix in the first path element, in addition to its intended use as the first element to indicate a path relative to the user's home directory. Attackers can exploit this flaw to bypass filtering or execute arbitrary code by crafting a path like /~2/foo while accessing a server with a specific user.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"A path traversal vulnerability exists in curl <8.0.0 SFTP implementation causes the tilde (~) character to be wrongly replaced when used as a prefix in the first path element, in addition to its intended use as the first element to indicate a path relative to the user's home directory. Attackers can exploit this flaw to bypass filtering or execute arbitrary code by crafting a path like /~2/foo while accessing a server with a specific user.","source":"cvelist"},{"lang":"en","text":"curl supports SFTP transfers. curl's SFTP implementation offers a special\nfeature in the path component of URLs: a tilde (`~`) character as the first\npath element in the path to denotes a path relative to the user's home\ndirectory. This is supported because of wording in the [once proposed\nto-become RFC\ndraft](https://datatracker.ietf.org/doc/html/draft-ietf-secsh-scp-sftp-ssh-uri-04)\nthat was to dictate how SFTP URLs work.\n\nDue to a bug, the handling of the tilde in SFTP path did however not only\nreplace it when it is used stand-alone as the first path element but also\nwrongly when used as a mere prefix in the first element.\n\nUsing a path like `/~2/foo` when accessing a server using the user `dan` (with\nhome directory `/home/dan`) would then quite surprisingly access the file\n`/home/dan2/foo`.\n\nThis can be taken advantage of to circumvent filtering or worse.","format":"markdown","source":"curl"},{"lang":"es","text":"Una vulnerabilidad de salto de ruta existe en la implementación SFTP de curl anterior a 8.0.0 que causa que el carácter tilde (~) sea reemplazado incorrectamente cuando se usa como prefijo en el primer elemento de la ruta, además de su uso previsto como primer elemento para indicar una ruta relativa al directorio de inicio del usuario. Los atacantes pueden explotar esta falla para eludir el filtrado o ejecutar código arbitrario creando una ruta como /~2/foo al acceder a un servidor con un usuario específico.","source":"nvd"}],"published":"2023-03-20T08:00:00.000Z","modified":"2026-10-25T01:04:36.918Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"curl","scheme":"rating","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"Fixed in 8.0.0","status":"affected"}],"product":"https://github.com/curl/curl","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"7.18.0","status":"affected","fixed":"8.0.0"},{"type":"git","introduced":"ba6f20a2442ab1ebfe947cff19a552f92114a29a","status":"affected","fixed":"4e2b52b5f7a3bf50a0f1494155717b02cc1df6d6"}],"repo":"https://github.com/curl/curl.git","source":"curl"},{"ranges":[{"status":"affected","introduced":"7.18.0","lastAffected":"7.88.1"}],"vendor":"haxx","product":"curl","cpe":"cpe:2.3:a:haxx:curl:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"36"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"active_iq_unified_manager","cpe":"cpe:2.3:a:netapp:active_iq_unified_manager:-:*:*:*:*:vmware_vsphere:*:*","source":"nvd"},{"ranges":[],"vendor":"broadcom","product":"brocade_fabric_operating_system_firmware","cpe":"cpe:2.3:o:broadcom:brocade_fabric_operating_system_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"h300s_firmware","cpe":"cpe:2.3:o:netapp:h300s_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"h500s_firmware","cpe":"cpe:2.3:o:netapp:h500s_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"h700s_firmware","cpe":"cpe:2.3:o:netapp:h700s_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"h410s_firmware","cpe":"cpe:2.3:o:netapp:h410s_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","introduced":"8.2.0","fixed":"8.2.12"},{"status":"affected","introduced":"9.0.0","fixed":"9.0.6"},{"status":"affected","version":"9.1.0"}],"vendor":"splunk","product":"universal_forwarder","cpe":"cpe:2.3:a:splunk:universal_forwarder:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://hackerone.com/reports/1892351","tags":["exploit","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/36NBD5YLJXXEDZLDGNFCERWRYJQ6LAQW/","tags":["mailing-list","third-party-advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20230420-0012/","tags":["third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://security.gentoo.org/glsa/202310-12","tags":["third-party-advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/03/msg00016.html","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-806742.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-943925.html","tags":[],"sources":["cvelist","nvd"]}],"credits":["Harry Sintonen","Daniel Stenberg"],"assigner":"hackerone","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-04-23T13:29:22.277Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-27534","url":"https://www.cve.org/CVERecord?id=CVE-2023-27534","licence":"CVE Terms of Use","modified":"2026-10-14T22:36:59.941Z"},{"source":"curl","name":"curl","id":"CURL-CVE-2023-27534","url":"https://osv.dev/vulnerability/CURL-CVE-2023-27534","licence":"MIT","modified":"2026-10-25T01:04:36.918Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-27534","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-27534","licence":"Public domain","modified":"2026-10-23T23:10:00.157Z"}],"updatedAt":"2026-11-25T22:58:22.880Z","epss":{"score":0.0244,"percentile":0.84752,"date":"2026-12-01T12:00:22.000Z"}}