ghsa-2c4m-59x9-fr2g
Vulnerability from github
Published
2023-05-12 20:19
Modified
2023-06-16 17:57
Summary
Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function
Details

The filename parameter of the Context.FileAttachment function is not properly sanitized. A maliciously crafted filename can cause the Content-Disposition header to be sent with an unexpected filename value or otherwise modify the Content-Disposition header. For example, a filename of "setup.bat";x=.txt" will be sent as a file named "setup.bat".

If the FileAttachment function is called with names provided by an untrusted source, this may permit an attacker to cause a file to be served with a name different than provided. Maliciously crafted attachment file name can modify the Content-Disposition header.

Show details on source website


{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/gin-gonic/gin"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.3.1-0.20190301021747-ccb9e902956d"
            },
            {
              "fixed": "1.9.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-29401"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-494"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-05-12T20:19:25Z",
    "nvd_published_at": "2023-06-08T21:15:16Z",
    "severity": "MODERATE"
  },
  "details": "The filename parameter of the Context.FileAttachment function is not properly sanitized. A maliciously crafted filename can cause the Content-Disposition header to be sent with an unexpected filename value or otherwise modify the Content-Disposition header. For example, a filename of \"setup.bat\u0026quot;;x=.txt\" will be sent as a file named \"setup.bat\".\n\nIf the FileAttachment function is called with names provided by an untrusted source, this may permit an attacker to cause a file to be served with a name different than provided. Maliciously crafted attachment file name can modify the Content-Disposition header.",
  "id": "GHSA-2c4m-59x9-fr2g",
  "modified": "2023-06-16T17:57:38Z",
  "published": "2023-05-12T20:19:25Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-29401"
    },
    {
      "type": "WEB",
      "url": "https://github.com/gin-gonic/gin/issues/3555"
    },
    {
      "type": "WEB",
      "url": "https://github.com/gin-gonic/gin/pull/3556"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/gin-gonic/gin"
    },
    {
      "type": "WEB",
      "url": "https://github.com/gin-gonic/gin/releases/tag/v1.9.1"
    },
    {
      "type": "WEB",
      "url": "https://pkg.go.dev/vuln/GO-2023-1737"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.