{"id":"JLSEC-2026-774","summary":"`sniff_csv` provides filesystem access even when `enable_external_access` is disabled in duckdb","details":"### Summary\n\nContent in filesystem is accessible for reading using `sniff_csv`, even with `enable_external_access=false`.\n\n### Details\n\nDuring a pentest, a security researcher was able to access environment variable data and other system data by using the `sniff_csv` function, even though we set `enable_external_access` to false.\n\n### PoC\n\n```SQL\nSET enable_external_access=false;\nSET lock_configuration=true;\n\nSELECT Columns FROM sniff_csv('/proc/self/environ');\n```\n\n### Impact\n\nProvides an attacker with access to filesystem even when access is expected to be disabled and other similar functions do NOT provide access.\n\nFor example `select * from read_csv('/proc/self/environ')` fails with a permission error.\n\nThere seems to be two vectors to this vulnerability:\n\n 1. Access to files that should otherwise not be allowed. (We expect `Permission Error: Scanning CSV files is disabled through configuration` and not to provide any access to the file or even acknowledge that it exists).\n 2. The content from a (non-csv?) file can be read (e.g. `/etc/hosts`, `proc/self/environ`, etc) even though that doesn't seem to be the intent of the `sniff_csv` function (my understanding is it's intending to provide information about the shape of the data, but not provide the data itself).\n\n### Workaround\n\nIt is possible to work around the issue by disabling the local file system using the `disabled_filesystems` setting:\n\n```SQL\nSET disabled_filesystems='LocalFileSystem';\nSET lock_configuration=true;\n\nSELECT Columns FROM sniff_csv('/proc/self/environ');\n```\n\nwill result in `Permission Error: File system LocalFileSystem has been disabled by configuration`.\n\n### Fix\n\nA fix has been merged into the `main` branch (https://github.com/duckdb/duckdb/pull/13133), and will be released with the next DuckDB release.","modified":"2026-07-25T18:24:54.205064529Z","published":"2026-07-20T14:13:17.389Z","upstream":["CVE-2024-41672","GHSA-w2gf-jxc9-pf2q","EUVD-2024-0052","PYSEC-2024-203"],"database_specific":{"license":"CC-BY-4.0","sources":[{"imported":"2026-07-20T06:08:43.831Z","modified":"2026-06-17T07:48:01.323Z","published":"2024-07-24T18:15:05.527Z","url":"https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2024-41672","html_url":"https://nvd.nist.gov/vuln/detail/CVE-2024-41672","database_specific":{"status":"Modified"},"id":"CVE-2024-41672"},{"url":"https://api.github.com/advisories/GHSA-w2gf-jxc9-pf2q","html_url":"https://github.com/advisories/GHSA-w2gf-jxc9-pf2q","id":"GHSA-w2gf-jxc9-pf2q","imported":"2026-07-20T06:08:49.610Z","modified":"2025-01-21T21:07:56Z","published":"2025-01-21T21:07:56Z"},{"modified":"2024-08-02T04:46:52Z","published":"2024-07-24T17:47:20Z","url":"https://euvdservices.enisa.europa.eu/api/enisaid?id=EUVD-2024-0052","html_url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2024-0052","id":"EUVD-2024-0052","imported":"2026-07-20T06:08:44.107Z"}]},"references":[{"type":"WEB","url":"https://github.com/advisories/GHSA-w2gf-jxc9-pf2q"},{"type":"WEB","url":"https://github.com/duckdb/duckdb/commit/c9b7c98aa0e1cd7363fe8bb8543a95f38e980d8a"},{"type":"WEB","url":"https://github.com/duckdb/duckdb/pull/13133"},{"type":"WEB","url":"https://github.com/duckdb/duckdb/security/advisories/GHSA-w2gf-jxc9-pf2q"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/duckdb/PYSEC-2024-203.yaml"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-41672"}],"affected":[{"package":{"name":"DuckDB_jll","ecosystem":"Julia","purl":"pkg:julia/DuckDB_jll?uuid=2cbbab25-fc8b-58cf-88d4-687a02676033"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.1.0+0"}]}],"database_specific":{"source":"https://github.com/JuliaLang/SecurityAdvisories.jl/tree/generated/osv/2026/JLSEC-2026-774.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"}],"credits":[{"name":"zacMode","contact":["https://github.com/zacMode"],"type":"REPORTER"}]}