{"id":"CVE-2021-23772","aliases":["CVE-2021-23772","GHSA-jcxc-rh6w-wf49","GO-2022-0272"],"related":[],"kind":"vulnerability","state":"published","title":"Arbitrary File Write","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"go"},{"lang":"es","text":"Esto afecta a todas las versiones del paquete github.com/kataras/iris; todas las versiones del paquete github.com/kataras/iris/v12. Un manejo no seguro de los nombres de archivo durante la carga usando el método UploadFormFiles puede permitir a atacantes escribir en ubicaciones arbitrarias fuera de la carpeta de destino designada","source":"nvd"}],"published":"2021-12-24T12:05:14.635Z","modified":"2026-06-17T03:38:52.827Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},{"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"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-59"],"affected":[{"ranges":[{"type":"custom","introduced":"0","fixed":"unspecified","status":"affected"}],"product":"github.com/kataras/iris","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"unspecified","status":"affected"}],"product":"github.com/kataras/iris/v12","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"12.2.0-alpha8"}],"ecosystem":"Go","package":"github.com/kataras/iris/v12","purl":"pkg:golang/github.com/kataras/iris/v12","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"0.0.2"}],"ecosystem":"Go","package":"github.com/kataras/iris","purl":"pkg:golang/github.com/kataras/iris","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"12.2.0-alpha8"}],"ecosystem":"Go","package":"github.com/kataras/iris/v12","purl":"pkg:golang/github.com/kataras/iris/v12","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/kataras/iris","purl":"pkg:golang/github.com/kataras/iris","source":"go"},{"ranges":[{"status":"affected","lastAffected":"12.1.8"},{"status":"affected","version":"12.2.0"},{"status":"affected","version":"12.2.0"},{"status":"affected","version":"12.2.0"},{"status":"affected","version":"12.2.0"},{"status":"affected","version":"12.2.0"}],"vendor":"iris-go","product":"iris","cpe":"cpe:2.3:a:iris-go:iris:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRIS-2325169","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRISV12-2325170","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/kataras/iris/commit/e213dba0d32ff66653e0ef124bc5088817264b08","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23772","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/kataras/iris","tags":["package"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0272","tags":["web"],"sources":["ghsa"]}],"credits":["Snyk Security Team"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-23772","url":"https://www.cve.org/CVERecord?id=CVE-2021-23772","licence":"CVE Terms of Use","modified":"2024-09-16T20:03:06.172Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jcxc-rh6w-wf49","url":"https://github.com/advisories/GHSA-jcxc-rh6w-wf49","licence":"CC-BY-4.0","modified":"2025-01-14T09:12:23.966Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0272","url":"https://pkg.go.dev/vuln/GO-2022-0272","licence":"CC-BY-4.0","modified":"2025-01-14T09:12:23.966Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-23772","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23772","licence":"Public domain","modified":"2026-06-17T03:38:52.827Z"}],"updatedAt":"2026-11-25T22:58:06.158Z","epss":{"score":0.01882,"percentile":0.80076,"date":"2026-12-01T12:00:22.000Z"}}