{"id":"CVE-2021-23772","aliases":["EUVD-2022-0626","GHSA-jcxc-rh6w-wf49","GO-2022-0272"],"status":"published","title":"Arbitrary File Write","description":"This affects all versions of package github.com/kataras/iris; all versions of package github.com/kataras/iris/v12. The unsafe handling of file names during upload using UploadFormFiles method may enable attackers to write to arbitrary locations outside the designated target folder.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.01882,"percentile":0.79646,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-59"],"published":"2021-12-24T12:05:14Z","modified":"2026-10-20T10:54:33Z","fixes":[{"ecosystem":"Go","package":"github.com/kataras/iris/v12","fixed_in":["12.2.0-alpha8"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/kataras/iris/v12","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"12.2.0-alpha8"}]}]},{"source":"ghsa","ecosystem":"Go","package":"github.com/kataras/iris","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.0.2"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/kataras/iris/v12","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"12.2.0-alpha8"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/kataras/iris","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.0.2"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/kataras/iris/v12","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"12.2.0-alpha8"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/kataras/iris","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]}],"products":[{"vendor":"iris-go","product":"iris"}],"references":[{"url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRIS-2325169","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","fix","web"]},{"url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRISV12-2325170","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/kataras/iris/commit/e213dba0d32ff66653e0ef124bc5088817264b08","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23772","tags":["advisory"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0272","tags":["web"]},{"url":"https://github.com/advisories/GHSA-jcxc-rh6w-wf49"},{"url":"https://github.com/kataras/iris","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-23772","title":"Arbitrary File Write","description":"This affects all versions of package github.com/kataras/iris; all versions of package github.com/kataras/iris/v12. The unsafe handling of file names during upload using UploadFormFiles method may enable attackers to write to arbitrary locations outside the designated target folder.","status":"published","published":"2021-12-24T12:05:14.635Z","modified":"2024-09-16T20:03:06.172Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"updated_at":"2026-11-02T14:33:00.488332Z"}],"euvd":[{"id":"EUVD-2022-0626","description":"This affects all versions of package github.com/kataras/iris; all versions of package github.com/kataras/iris/v12. The unsafe handling of file names during upload using UploadFormFiles method may enable attackers to write to arbitrary locations outside the designated target folder.","status":"published","published":"2021-12-24T12:05:14Z","modified":"2024-09-16T20:03:06Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-03T00:55:17.735013Z"}],"ghsa":[{"id":"GHSA-jcxc-rh6w-wf49","title":"Link Following in Iris","description":"This affects all versions of package github.com/kataras/iris; all versions of package github.com/kataras/iris/v12. The unsafe handling of file names during upload using UploadFormFiles method may enable attackers to write to arbitrary locations outside the designated target folder.","status":"published","published":"2022-01-06T21:36:19Z","modified":"2023-02-14T21:15:43Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-59"],"updated_at":"2026-11-02T14:36:45.67005Z"}],"nvd":[{"id":"CVE-2021-23772","description":"This affects all versions of package github.com/kataras/iris; all versions of package github.com/kataras/iris/v12. The unsafe handling of file names during upload using UploadFormFiles method may enable attackers to write to arbitrary locations outside the designated target folder.","status":"published","published":"2021-12-24T12:15:07.697Z","modified":"2026-06-17T03:38:52.827Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-59"],"updated_at":"2026-11-02T14:07:02.977492Z"}],"osv":[{"id":"CVE-2021-23772","description":"This affects all versions of package github.com/kataras/iris; all versions of package github.com/kataras/iris/v12. The unsafe handling of file names during upload using UploadFormFiles method may enable attackers to write to arbitrary locations outside the designated target folder.","status":"published","published":"2021-12-24T12:15:07.697Z","modified":"2026-10-20T10:54:33.020090829Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:18.778776Z"},{"id":"GHSA-jcxc-rh6w-wf49","title":"Link Following in Iris","description":"This affects all versions of package github.com/kataras/iris; all versions of package github.com/kataras/iris/v12. The unsafe handling of file names during upload using UploadFormFiles method may enable attackers to write to arbitrary locations outside the designated target folder.","status":"published","published":"2022-01-06T21:36:19Z","modified":"2025-01-14T09:12:23.966394Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-59"],"updated_at":"2026-11-02T15:46:50.336262Z"},{"id":"GO-2022-0272","title":"Directory traversal in github.com/kataras/iris and github.com/kataras/iris/v12","description":"The Context.UploadFormFiles function is vulnerable to directory traversal attacks, and can be made to write to arbitrary locations outside the destination directory.\n\nThis vulnerability only occurs when built with Go versions prior to 1.17. Go 1.17 and later strip directory paths from filenames returned by \"mime/multipart\".Part.FileName, which avoids this issue.","status":"published","published":"2022-07-15T23:08:12Z","modified":"2025-01-14T09:12:23.966394Z","updated_at":"2026-11-02T15:47:00.604718Z"}]}}
