{"id":"GHSA-28m8-9j7v-x499","summary":"Tauri's readDir Endpoint Scope can be Bypassed With Symbolic Links","details":"### Impact\nDue to missing canonicalization when `readDir` is called recursively, it was possible to display directory listings outside of the defined `fs` scope. This required a crafted symbolic link or junction folder inside an allowed path of the `fs` scope. No arbitrary file content could be leaked.\n\n\n### Patches\nThe issue has been resolved in https://github.com/tauri-apps/tauri/pull/5123 and the implementation now properly checks if the\nrequested (sub) directory is a symbolic link outside of the defined `scope`.\n\n### Workarounds\nDisable the `readDir` endpoint in the `allowlist` inside the `tauri.conf.json`.\n\n### For more information\n\nThis issue was initially reported by [martin-ocasek]( https://github.com/martin-ocasek) in [#4882](https://github.com/tauri-apps/tauri/issues/4882).\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [tauri](https://github.com/tauri-apps/tauri)\n* Email us at [security@tauri.app](mailto:security@tauri.app)\n","aliases":["CVE-2022-39215","RUSTSEC-2022-0088"],"modified":"2023-11-08T04:10:15.123159Z","published":"2022-09-16T19:28:49Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2022-09-16T19:28:49Z","nvd_published_at":"2022-09-15T22:15:00Z","cwe_ids":["CWE-22","CWE-59"]},"references":[{"type":"WEB","url":"https://github.com/tauri-apps/tauri/security/advisories/GHSA-28m8-9j7v-x499"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39215"},{"type":"WEB","url":"https://github.com/tauri-apps/tauri/issues/4882"},{"type":"WEB","url":"https://github.com/tauri-apps/tauri/pull/5123"},{"type":"WEB","url":"https://github.com/tauri-apps/tauri/pull/5123/commits/1f9b9e8d26a2c915390323e161020bcb36d44678"},{"type":"WEB","url":"https://github.com/tauri-apps/tauri/commit/bb178829086e80916f9be190f02d83bc25802799"},{"type":"PACKAGE","url":"https://github.com/tauri-apps/tauri"},{"type":"WEB","url":"https://github.com/tauri-apps/tauri/releases/tag/tauri-v1.0.6"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2022-0088.html"}],"affected":[{"package":{"name":"tauri","ecosystem":"crates.io","purl":"pkg:cargo/tauri"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.0.6"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/09/GHSA-28m8-9j7v-x499/GHSA-28m8-9j7v-x499.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N"}]}