cve-2023-49293
Vulnerability from cvelistv5
Published
2023-12-04 23:03
Modified
2024-08-02 21:53
Summary
Vite is a website frontend framework. When Vite's HTML transformation is invoked manually via `server.transformIndexHtml`, the original request URL is passed in unmodified, and the `html` being transformed contains inline module scripts (`<script type="module">...</script>`), it is possible to inject arbitrary HTML into the transformed output by supplying a malicious URL query string to `server.transformIndexHtml`. Only apps using `appType: 'custom'` and using the default Vite HTML middleware are affected. The HTML entry must also contain an inline script. The attack requires a user to click on a malicious URL while running the dev server. Restricted files aren't exposed to the attacker. This issue has been addressed in vite@5.0.5, vite@4.5.1, and vite@4.4.12. There are no known workarounds for this vulnerability.
Impacted products
Vendor Product Version
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T21:53:44.657Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "name": "https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97",
            "tags": [
              "x_refsource_CONFIRM",
              "x_transferred"
            ],
            "url": "https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "vite",
          "vendor": "vitejs",
          "versions": [
            {
              "status": "affected",
              "version": "\u003e=4.4.0, \u003c 4.4.12"
            },
            {
              "status": "affected",
              "version": "= 4.5.0"
            },
            {
              "status": "affected",
              "version": "\u003e=5.0.0, \u003c 5.0.5"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "Vite is a website frontend framework. When Vite\u0027s HTML transformation is invoked manually via `server.transformIndexHtml`, the original request URL is passed in unmodified, and the `html` being transformed contains inline module scripts (`\u003cscript type=\"module\"\u003e...\u003c/script\u003e`), it is possible to inject arbitrary HTML into the transformed output by supplying a malicious URL query string to `server.transformIndexHtml`. Only apps using `appType: \u0027custom\u0027` and using the default Vite HTML middleware are affected. The HTML entry must also contain an inline script. The attack requires a user to click on a malicious URL while running the dev server. Restricted files aren\u0027t exposed to the attacker. This issue has been addressed in vite@5.0.5, vite@4.5.1, and vite@4.4.12. There are no known workarounds for this vulnerability."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "NONE",
            "baseScore": 6.1,
            "baseSeverity": "MEDIUM",
            "confidentialityImpact": "LOW",
            "integrityImpact": "LOW",
            "privilegesRequired": "NONE",
            "scope": "CHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
            "version": "3.1"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-79",
              "description": "CWE-79: Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2023-12-04T23:03:30.752Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97"
        }
      ],
      "source": {
        "advisory": "GHSA-92r3-m2mg-pj97",
        "discovery": "UNKNOWN"
      },
      "title": "Cross-site Scripting in `server.transformIndexHtml` via URL payload in vite"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2023-49293",
    "datePublished": "2023-12-04T23:03:30.752Z",
    "dateReserved": "2023-11-24T16:45:24.313Z",
    "dateUpdated": "2024-08-02T21:53:44.657Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-49293\",\"sourceIdentifier\":\"security-advisories@github.com\",\"published\":\"2023-12-04T23:15:27.730\",\"lastModified\":\"2024-11-21T08:33:12.293\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"Vite is a website frontend framework. When Vite\u0027s HTML transformation is invoked manually via `server.transformIndexHtml`, the original request URL is passed in unmodified, and the `html` being transformed contains inline module scripts (`\u003cscript type=\\\"module\\\"\u003e...\u003c/script\u003e`), it is possible to inject arbitrary HTML into the transformed output by supplying a malicious URL query string to `server.transformIndexHtml`. Only apps using `appType: \u0027custom\u0027` and using the default Vite HTML middleware are affected. The HTML entry must also contain an inline script. The attack requires a user to click on a malicious URL while running the dev server. Restricted files aren\u0027t exposed to the attacker. This issue has been addressed in vite@5.0.5, vite@4.5.1, and vite@4.4.12. There are no known workarounds for this vulnerability.\"},{\"lang\":\"es\",\"value\":\"Vite es un framework de interfaz de sitio web. Cuando la transformaci\u00f3n HTML de Vite se invoca manualmente a trav\u00e9s de `server.transformIndexHtml`, la URL de solicitud original se pasa sin modificar y el `html` que se transforma contiene scripts de m\u00f3dulo en l\u00ednea (``), es posible inyectar HTML arbitrario en la salida transformada proporcionando una cadena de consulta URL maliciosa a `server.transformIndexHtml`. Solo se ven afectadas las aplicaciones que usan `appType: \u0027custom\u0027` y usan el middleware HTML predeterminado de Vite. La entrada HTML tambi\u00e9n debe contener un script en l\u00ednea. El ataque requiere que un usuario haga clic en una URL maliciosa mientras ejecuta el servidor de desarrollo. Los archivos restringidos no est\u00e1n expuestos al atacante. Este problema se ha solucionado en vite@5.0.5, vite@4.5.1 y vite@4.4.12. No se conocen workarounds para esta vulnerabilidad.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N\",\"baseScore\":6.1,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"REQUIRED\",\"scope\":\"CHANGED\",\"confidentialityImpact\":\"LOW\",\"integrityImpact\":\"LOW\",\"availabilityImpact\":\"NONE\"},\"exploitabilityScore\":2.8,\"impactScore\":2.7},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N\",\"baseScore\":6.1,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"REQUIRED\",\"scope\":\"CHANGED\",\"confidentialityImpact\":\"LOW\",\"integrityImpact\":\"LOW\",\"availabilityImpact\":\"NONE\"},\"exploitabilityScore\":2.8,\"impactScore\":2.7}]},\"weaknesses\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-79\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:*\",\"versionStartIncluding\":\"4.4.0\",\"versionEndIncluding\":\"4.4.11\",\"matchCriteriaId\":\"794F0A24-E042-454A-8AF4-410CA6B9B7ED\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:*\",\"versionStartIncluding\":\"5.0.0\",\"versionEndIncluding\":\"5.0.4\",\"matchCriteriaId\":\"5035825C-DE1D-4C3E-B80A-B80BAA9B9B83\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:-:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"49DB9151-3306-4887-B467-54BF1CB59077\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta0:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"AD12B845-C230-4731-A1C3-F7C8563EC330\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta1:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"71B39887-494A-42B0-97B5-3A27BBDA384F\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta10:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"42748778-8084-4E85-A870-F4938B2B4197\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta11:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"8CEA9A64-2C3B-48CD-B553-1B266E6D98DF\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta12:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"C4335B97-76B1-4B91-BDF1-0DFFB8B5D966\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta13:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"D4393D1C-F71A-4FBB-896E-91F5BDE99F5F\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta14:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"41F91182-DFB5-4900-967A-3467C1160FD1\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta15:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"E3A2BCC8-1B86-47D9-B1D9-374B3FAF452F\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta16:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"659D1924-3224-4F96-B88C-1A98909C3129\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta17:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"239A48C0-7571-46A9-ADF8-8044F89312DB\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta18:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"0DBF0C24-7E51-4E33-B265-872250BAAFFE\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta19:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"061FD0EC-C333-43A4-B003-0B2C7CC5F377\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta2:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"CDAA6C11-11F8-466A-910F-CEB4ECA6C2B2\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta20:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"E3FE8672-FB0B-4E18-8830-85A858B4EBCD\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta3:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"9DBA3329-186A-48FD-A1F1-0F0F4487FEB0\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta4:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"A4C137DE-8111-447B-AB2A-5DCF19C1EDE8\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta5:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"1866630A-7067-4B2D-BB66-FA5A49556046\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta6:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"0490F00F-EE92-4A86-A11F-7A81345700AF\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta7:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"F7947662-99E7-42FA-9F5B-FBB84B370E76\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta8:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"DC5DF679-2F1D-4DDC-AD63-D4013D61D5F6\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:vitejs:vite:5.0.0:beta9:*:*:*:node.js:*:*\",\"matchCriteriaId\":\"D3EE21DD-285A-4B6A-A607-60D4E3842B28\"}]}]}],\"references\":[{\"url\":\"https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Exploit\",\"Third Party Advisory\"]},{\"url\":\"https://github.com/vitejs/vite/security/advisories/GHSA-92r3-m2mg-pj97\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Exploit\",\"Third Party Advisory\"]}]}}"
  }
}


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.