Vulnerabilities in pkg:golang/github.com/kataras/iris/v12

PACKAGE
Advisory Identifier: GHSA-jcxc-rh6w-wf49
Advisory Summary

CVE-2021-23772 is a HIGH (CVSS 7.5) link following vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Github.com/kataras/iris/v12 libraries in the Go ecosystem. The issue involves link following in iris. Remediation is available by upgrading affected packages to version 12.2.0-alpha8.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/kataras/iris/v12

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/kataras/iris/v12. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-jcxc-rh6w-wf49 CVE-2021-23772 HIGH Link Following in Iris

CVE-2021-23772 at a Glance

CVE Identifier CVE-2021-23772
GHSA Identifier GHSA-jcxc-rh6w-wf49
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product Github.com/kataras/iris/v12
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2021-23772

To remediate this vulnerability, upgrade all affected Github.com/kataras/iris/v12 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/kataras/iris/v12 fixed: 12.2.0-alpha8
Upgrade github.com/kataras/iris/v12 to 12.2.0-alpha8
github.com/kataras/iris fixed: Latest secure release
Upgrade github.com/kataras/iris to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/kataras/iris/v12

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-23772, inspect your project dependencies for Github.com/kataras/iris/v12:

inspect dependencies for github.com/kataras/iris/v12

Analyze the terminal output to locate any version of Github.com/kataras/iris/v12 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.2.0-alpha8), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In Github.com/kataras/iris/v12, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2021-23772 Affected Github.com/kataras/iris/v12 Versions

2 component(s)
Fixed Versions:
12.2.0-alpha8
Product / Package Ecosystem Affected Versions Fixed Version
github.com/kataras/iris/v12
Go
< 12.2.0-alpha8
12.2.0-alpha8
github.com/kataras/iris
Go
≤ 0.0.2

References

Frequently Asked Questions

What is CVE-2021-23772?
CVE-2021-23772 is a security vulnerability in Github.com/kataras/iris/v12 involving Link Following in Iris under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which Github.com/kataras/iris/v12 versions are affected?
Affected versions include releases prior to 12.2.0-alpha8 across affected packages: github.com/kataras/iris/v12, github.com/kataras/iris.
What version fixes CVE-2021-23772?
Upgrading to 12.2.0-alpha8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/kataras/iris/v12 affected?
Yes, github.com/kataras/iris/v12 is affected in releases prior to 12.2.0-alpha8. Upgrade your dependency to 12.2.0-alpha8 or later.
Is github.com/kataras/iris affected?
Yes, github.com/kataras/iris is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2021-23772?
CVE-2021-23772 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-23772?
CVE-2021-23772 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.).
How can I check Go dependencies for CVE-2021-23772?
Run the dependency tree command: 'inspect dependencies for github.com/kataras/iris/v12'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jcxc-rh6w-wf49",
  "modified" : "2022-01-05T18:09:47Z",
  "published" : "2022-01-06T21:36:19Z",
  "aliases" : [ "CVE-2021-23772" ],
  "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/kataras/iris/v12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "12.2.0-alpha8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/kataras/iris"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.0.2"
      } ]
    } ]
  } ],
  "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"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-01-05T18:09:47Z",
    "nvd_published_at" : "2021-12-24T12:15:00Z"
  }
}