gsd-2023-29401
Vulnerability from gsd
Modified
2023-12-13 01:20
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.
Aliases
Aliases



{
  "GSD": {
    "alias": "CVE-2023-29401",
    "id": "GSD-2023-29401"
  },
  "gsd": {
    "metadata": {
      "exploitCode": "unknown",
      "remediation": "unknown",
      "reportConfidence": "confirmed",
      "type": "vulnerability"
    },
    "osvSchema": {
      "aliases": [
        "CVE-2023-29401"
      ],
      "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\". 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.",
      "id": "GSD-2023-29401",
      "modified": "2023-12-13T01:20:57.314519Z",
      "schema_version": "1.4.0"
    }
  },
  "namespaces": {
    "cve.org": {
      "CVE_data_meta": {
        "ASSIGNER": "security@golang.org",
        "ID": "CVE-2023-29401",
        "STATE": "PUBLIC"
      },
      "affects": {
        "vendor": {
          "vendor_data": [
            {
              "product": {
                "product_data": [
                  {
                    "product_name": "github.com/gin-gonic/gin",
                    "version": {
                      "version_data": [
                        {
                          "version_affected": "\u003c",
                          "version_name": "1.3.1-0.20190301021747-ccb9e902956d",
                          "version_value": "1.9.1"
                        }
                      ]
                    }
                  }
                ]
              },
              "vendor_name": "github.com/gin-gonic/gin"
            }
          ]
        }
      },
      "credits": [
        {
          "lang": "en",
          "value": "motoyasu-saburi"
        }
      ],
      "data_format": "MITRE",
      "data_type": "CVE",
      "data_version": "4.0",
      "description": {
        "description_data": [
          {
            "lang": "eng",
            "value": "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\". 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."
          }
        ]
      },
      "problemtype": {
        "problemtype_data": [
          {
            "description": [
              {
                "lang": "eng",
                "value": "CWE 20: Improper Input Validation"
              }
            ]
          }
        ]
      },
      "references": {
        "reference_data": [
          {
            "name": "https://github.com/gin-gonic/gin/issues/3555",
            "refsource": "MISC",
            "url": "https://github.com/gin-gonic/gin/issues/3555"
          },
          {
            "name": "https://github.com/gin-gonic/gin/pull/3556",
            "refsource": "MISC",
            "url": "https://github.com/gin-gonic/gin/pull/3556"
          },
          {
            "name": "https://github.com/gin-gonic/gin/releases/tag/v1.9.1",
            "refsource": "MISC",
            "url": "https://github.com/gin-gonic/gin/releases/tag/v1.9.1"
          },
          {
            "name": "https://pkg.go.dev/vuln/GO-2023-1737",
            "refsource": "MISC",
            "url": "https://pkg.go.dev/vuln/GO-2023-1737"
          }
        ]
      }
    },
    "gitlab.com": {
      "advisories": [
        {
          "affected_range": "\u003e=v1.3.1-0.20190301021747-ccb9e902956d \u003cv1.9.1",
          "affected_versions": "All versions starting from 1.3.1-0.20190301021747-ccb9e902956d before 1.9.1",
          "cvss_v3": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
          "cwe_ids": [
            "CWE-1035",
            "CWE-494",
            "CWE-937"
          ],
          "date": "2023-06-16",
          "description": "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.",
          "fixed_versions": [
            "v1.9.1"
          ],
          "identifier": "CVE-2023-29401",
          "identifiers": [
            "CVE-2023-29401",
            "GHSA-2c4m-59x9-fr2g"
          ],
          "not_impacted": "",
          "package_slug": "go/github.com/gin-gonic/gin",
          "pubdate": "2023-06-08",
          "solution": "Upgrade to version 1.9.1 or above.",
          "title": "Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function",
          "urls": [
            "https://github.com/gin-gonic/gin/issues/3555",
            "https://github.com/gin-gonic/gin/pull/3556",
            "https://pkg.go.dev/vuln/GO-2023-1737",
            "https://github.com/advisories/GHSA-2c4m-59x9-fr2g"
          ],
          "uuid": "f7b7d89a-34d2-4ac8-9fc6-605ad3801318",
          "versions": [
            {
              "commit": {
                "sha": "4ea0e648e38a63d6caff14100f5eab5c50912bcd",
                "tags": [
                  "v1.9.1"
                ],
                "timestamp": "20230601022620"
              },
              "number": "v1.9.1"
            }
          ]
        }
      ]
    },
    "nvd.nist.gov": {
      "configurations": {
        "CVE_data_version": "4.0",
        "nodes": [
          {
            "children": [],
            "cpe_match": [
              {
                "cpe23Uri": "cpe:2.3:a:gin-gonic:gin:*:*:*:*:*:*:*:*",
                "cpe_name": [],
                "versionEndExcluding": "1.9.1",
                "versionStartIncluding": "1.3.1-0.20190301021747-ccb9e902956d",
                "vulnerable": true
              }
            ],
            "operator": "OR"
          }
        ]
      },
      "cve": {
        "CVE_data_meta": {
          "ASSIGNER": "security@golang.org",
          "ID": "CVE-2023-29401"
        },
        "data_format": "MITRE",
        "data_type": "CVE",
        "data_version": "4.0",
        "description": {
          "description_data": [
            {
              "lang": "en",
              "value": "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\". 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."
            }
          ]
        },
        "problemtype": {
          "problemtype_data": [
            {
              "description": [
                {
                  "lang": "en",
                  "value": "CWE-494"
                }
              ]
            }
          ]
        },
        "references": {
          "reference_data": [
            {
              "name": "https://pkg.go.dev/vuln/GO-2023-1737",
              "refsource": "MISC",
              "tags": [
                "Third Party Advisory"
              ],
              "url": "https://pkg.go.dev/vuln/GO-2023-1737"
            },
            {
              "name": "https://github.com/gin-gonic/gin/releases/tag/v1.9.1",
              "refsource": "MISC",
              "tags": [
                "Release Notes"
              ],
              "url": "https://github.com/gin-gonic/gin/releases/tag/v1.9.1"
            },
            {
              "name": "https://github.com/gin-gonic/gin/issues/3555",
              "refsource": "MISC",
              "tags": [
                "Exploit",
                "Issue Tracking"
              ],
              "url": "https://github.com/gin-gonic/gin/issues/3555"
            },
            {
              "name": "https://github.com/gin-gonic/gin/pull/3556",
              "refsource": "MISC",
              "tags": [
                "Issue Tracking",
                "Patch"
              ],
              "url": "https://github.com/gin-gonic/gin/pull/3556"
            }
          ]
        }
      },
      "impact": {
        "baseMetricV3": {
          "cvssV3": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 4.3,
            "baseSeverity": "MEDIUM",
            "confidentialityImpact": "NONE",
            "integrityImpact": "LOW",
            "privilegesRequired": "NONE",
            "scope": "UNCHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
            "version": "3.1"
          },
          "exploitabilityScore": 2.8,
          "impactScore": 1.4
        }
      },
      "lastModifiedDate": "2023-06-16T12:45Z",
      "publishedDate": "2023-06-08T21:15Z"
    }
  }
}


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.