{"id":"CVE-2021-23772","aliases":["GHSA-jcxc-rh6w-wf49","GO-2022-0272"],"summary":"Arbitrary File Write","published_at":"2021-12-23T00:00:00Z","modified_at":"2025-01-14T09:12:23.966394Z","products":[],"rating":{"severity":"high","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","attack_path":"internet_authenticated","user_interaction":false,"malicious":false,"red_hat":"Moderate","vendor_ratings":[{"source":"Red Hat","rating":"Moderate"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.01882000081241131,"percentile":0.799239993095398,"date":"2026-11-19T00:00:00Z"},"priority":9.8,"details":"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.","affected_stack":[],"affected_other":[{"ecosystem":"Go","package":"github.com/kataras/iris","purl":"pkg:golang/github.com/kataras/iris","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.0.2"}]}],"provider":"osv","source":"GHSA-jcxc-rh6w-wf49","relation":"self"},{"ecosystem":"Go","package":"github.com/kataras/iris","purl":"pkg:golang/github.com/kataras/iris","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"provider":"osv","source":"GO-2022-0272","relation":"self"},{"ecosystem":"Go","package":"github.com/kataras/iris/v12","purl":"pkg:golang/github.com/kataras/iris/v12","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"12.2.0-alpha8"}]}],"fixed":["12.2.0-alpha8"],"provider":"osv","source":"GHSA-jcxc-rh6w-wf49","relation":"self"},{"ecosystem":"Go","package":"github.com/kataras/iris/v12","purl":"pkg:golang/github.com/kataras/iris/v12","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"12.2.0-alpha8"}]}],"fixed":["12.2.0-alpha8"],"provider":"osv","source":"GO-2022-0272","relation":"self"},{"ecosystem":"NVD","package":"iris-go:iris","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"12.1.8"}]}],"provider":"nvd","source":"CVE-2021-23772","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"not_affected","packages":["rhacm2/acm-grafana-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-23772"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2021-23772","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2021-23772","license":"CC-BY-4.0","published_at":"2021-12-24T12:05:14.635Z","modified_at":"2024-09-16T20:03:06.172Z","summary":"Arbitrary File Write","details":"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":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CVE-2021-23772"}],"affected":[],"product_status":[],"references":[{"type":"WEB","url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRIS-2325169"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRISV12-2325170"},{"type":"WEB","url":"https://github.com/kataras/iris/commit/e213dba0d32ff66653e0ef124bc5088817264b08"}]},{"provider":"nvd","source_id":"CVE-2021-23772","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23772","severity":[],"affected":[{"ecosystem":"NVD","package":"iris-go:iris","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"12.1.8"}]}],"provider":"nvd","source":"CVE-2021-23772","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"GHSA-jcxc-rh6w-wf49","relation":"self","url":"https://osv.dev/vulnerability/GHSA-jcxc-rh6w-wf49","license":"CC-BY-4.0","published_at":"2022-01-06T21:36:19Z","modified_at":"2025-01-14T09:12:23.966394Z","summary":"Link Following in Iris","details":"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":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"GHSA-jcxc-rh6w-wf49"}],"affected":[{"ecosystem":"Go","package":"github.com/kataras/iris","purl":"pkg:golang/github.com/kataras/iris","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.0.2"}]}],"provider":"osv","source":"GHSA-jcxc-rh6w-wf49","relation":"self"},{"ecosystem":"Go","package":"github.com/kataras/iris/v12","purl":"pkg:golang/github.com/kataras/iris/v12","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"12.2.0-alpha8"}]}],"fixed":["12.2.0-alpha8"],"provider":"osv","source":"GHSA-jcxc-rh6w-wf49","relation":"self"}],"product_status":[],"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23772"},{"type":"WEB","url":"https://github.com/kataras/iris/commit/e213dba0d32ff66653e0ef124bc5088817264b08"},{"type":"PACKAGE","url":"https://github.com/kataras/iris"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2022-0272"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRIS-2325169"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRISV12-2325170"}]},{"provider":"osv","source_id":"GO-2022-0272","relation":"self","url":"https://osv.dev/vulnerability/GO-2022-0272","license":"CC-BY-4.0","published_at":"2022-07-15T23:08:12Z","modified_at":"2025-01-14T09:12:23.966394Z","summary":"Directory traversal in github.com/kataras/iris and github.com/kataras/iris/v12","details":"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.","severity":[],"affected":[{"ecosystem":"Go","package":"github.com/kataras/iris","purl":"pkg:golang/github.com/kataras/iris","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"provider":"osv","source":"GO-2022-0272","relation":"self"},{"ecosystem":"Go","package":"github.com/kataras/iris/v12","purl":"pkg:golang/github.com/kataras/iris/v12","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"12.2.0-alpha8"}]}],"fixed":["12.2.0-alpha8"],"provider":"osv","source":"GO-2022-0272","relation":"self"}],"product_status":[],"references":[{"type":"FIX","url":"https://github.com/kataras/iris/commit/e213dba0d32ff66653e0ef124bc5088817264b08"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRIS-2325169"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRISV12-2325170"}]},{"provider":"redhat-vex","source_id":"CVE-2021-23772","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2021-23772","license":"CC-BY-4.0","published_at":"2021-12-23T00:00:00Z","modified_at":"2023-10-25T17:21:56Z","summary":"kataras/iris: unsafe handling of file names during upload using UploadFormFiles method may allow attackers to write to arbitrary locations outside the designated target folder","details":"A flaw was found in the Iris Web Framework, where the UploadFormFiles method unsafely handles file names during upload. This flaw allows an attacker to write in arbitrary locations outside the designated target folder.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CVE-2021-23772"},{"type":"Red Hat","score":"Moderate","source":"CVE-2021-23772"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"not_affected","packages":["rhacm2/acm-grafana-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-23772"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-23772.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-23772"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2036051"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-23772"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23772"},{"type":"WEB","url":"https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRIS-2325169"},{"type":"WEB","url":"https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRISV12-2325170"}]}],"references":[{"type":"WEB","url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRIS-2325169"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRISV12-2325170"},{"type":"WEB","url":"https://github.com/kataras/iris/commit/e213dba0d32ff66653e0ef124bc5088817264b08"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23772"},{"type":"PACKAGE","url":"https://github.com/kataras/iris"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2022-0272"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-23772.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-23772"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2036051"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-23772"},{"type":"WEB","url":"https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRIS-2325169"},{"type":"WEB","url":"https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRISV12-2325170"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2021-23772","url":"https://www.cve.org/CVERecord?id=CVE-2021-23772","license":"CC-BY-4.0","modified_at":"2024-09-16T20:03:06.172Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2021-23772","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23772","relation":"self"},{"provider":"osv","source_id":"GHSA-jcxc-rh6w-wf49","url":"https://osv.dev/vulnerability/GHSA-jcxc-rh6w-wf49","license":"CC-BY-4.0","modified_at":"2025-01-14T09:12:23.966394Z","relation":"self"},{"provider":"osv","source_id":"GO-2022-0272","url":"https://osv.dev/vulnerability/GO-2022-0272","license":"CC-BY-4.0","modified_at":"2025-01-14T09:12:23.966394Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2021-23772","url":"https://access.redhat.com/security/cve/CVE-2021-23772","license":"CC-BY-4.0","modified_at":"2023-10-25T17:21:56Z","relation":"self"}]}
