CVE-2021-23772
JSON

7.5high

Arbitrary File Write

Severity
7.5high CVSS:3.1 by snyk
Exploit likelihood
1.88% (higher than 80% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-jcxc-rh6w-wf49GO-2022-0272

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.

Affected

Product or packageVersionsReported by
github.com/kataras/irisbefore unspecifiedCVE List
github.com/kataras/iris/v12before unspecifiedCVE List
github.com/kataras/iris/v12 (Go)before 12.2.0-alpha8GitHub Advisory Database, Go Vulnerability Database
github.com/kataras/iris (Go)up to 0.0.2, all versionsGitHub Advisory Database, Go Vulnerability Database
iris-go irisup to 12.1.8, 12.2.0NVD

All scores

snyk7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD6.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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.

Go Vulnerability Database

The Context.UploadFormFiles function is vulnerable to directory traversal attacks, and can be made to write to arbitrary locations outside the destination directory.

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

NVD (es)

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

References

Sources

SourceRecordLicence
CVE ListCVE-2021-23772 changed 2024-09-16CVE Terms of Use
GitHub Advisory DatabaseGHSA-jcxc-rh6w-wf49 changed 2025-01-14CC-BY-4.0
Go Vulnerability DatabaseGO-2022-0272 changed 2025-01-14CC-BY-4.0
NVDCVE-2021-23772 changed 2026-06-17Public domain