CVE-2024-22423 (GCVE-0-2024-22423)

Vulnerability from cvelistv5 – Published: 2024-04-09 17:22 – Updated: 2025-02-13 17:33
VLAI?
Title
yt-dlp `--exec` command injection when using `%q` in yt-dlp on Windows
Summary
yt-dlp is a youtube-dl fork with additional features and fixes. The patch that addressed CVE-2023-40581 attempted to prevent RCE when using `--exec` with `%q` by replacing double quotes with two double quotes. However, this escaping is not sufficient, and still allows expansion of environment variables. Support for output template expansion in `--exec`, along with this vulnerable behavior, was added to `yt-dlp` in version 2021.04.11. yt-dlp version 2024.04.09 fixes this issue by properly escaping `%`. It replaces them with `%%cd:~,%`, a variable that expands to nothing, leaving only the leading percent. It is recommended to upgrade yt-dlp to version 2024.04.09 as soon as possible. Also, always be careful when using `--exec`, because while this specific vulnerability has been patched, using unvalidated input in shell commands is inherently dangerous. For Windows users who are not able to upgrade, avoid using any output template expansion in `--exec` other than `{}` (filepath); if expansion in `--exec` is needed, verify the fields you are using do not contain `"`, `|` or `&`; and/or instead of using `--exec`, write the info json and load the fields from it instead.
CWE
  • CWE-78 - Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Assigner
Impacted products
Vendor Product Version
yt-dlp yt-dlp Affected: >= 2021.04.11, < 2024.04.09
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-22423",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-04-10T19:34:51.632333Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:52:45.637Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-01T22:43:34.950Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "name": "https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p",
            "tags": [
              "x_refsource_CONFIRM",
              "x_transferred"
            ],
            "url": "https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p"
          },
          {
            "name": "https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qg",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qg"
          },
          {
            "name": "https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6e",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6e"
          },
          {
            "name": "https://github.com/yt-dlp/yt-dlp/commit/ff07792676f404ffff6ee61b5638c9dc1a33a37a",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/yt-dlp/yt-dlp/commit/ff07792676f404ffff6ee61b5638c9dc1a33a37a"
          },
          {
            "name": "https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11"
          },
          {
            "name": "https://github.com/yt-dlp/yt-dlp/releases/tag/2024.04.09",
            "tags": [
              "x_refsource_MISC",
              "x_transferred"
            ],
            "url": "https://github.com/yt-dlp/yt-dlp/releases/tag/2024.04.09"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://www.kb.cert.org/vuls/id/123335"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "yt-dlp",
          "vendor": "yt-dlp",
          "versions": [
            {
              "status": "affected",
              "version": "\u003e= 2021.04.11, \u003c 2024.04.09"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "yt-dlp is a youtube-dl fork with additional features and fixes. The patch that addressed CVE-2023-40581 attempted to prevent RCE when using `--exec` with `%q` by replacing double quotes with two double quotes. However, this escaping is not sufficient, and still allows expansion of environment variables. Support for output template expansion in `--exec`, along with this vulnerable behavior, was added to `yt-dlp` in version 2021.04.11. yt-dlp version 2024.04.09 fixes this issue by properly escaping `%`. It replaces them with `%%cd:~,%`, a variable that expands to nothing, leaving only the leading percent. It is recommended to upgrade yt-dlp to version 2024.04.09 as soon as possible. Also, always be careful when using `--exec`, because while this specific vulnerability has been patched, using unvalidated input in shell commands is inherently dangerous. For Windows users who are not able to upgrade, avoid using any output template expansion in `--exec` other than `{}` (filepath); if expansion in `--exec` is needed, verify the fields you are using do not contain `\"`, `|` or `\u0026`; and/or instead of using `--exec`, write the info json and load the fields from it instead."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "HIGH",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 8.4,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "scope": "CHANGED",
            "userInteraction": "REQUIRED",
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H",
            "version": "3.1"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-78",
              "description": "CWE-78: Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-04-10T16:06:03.527Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p"
        },
        {
          "name": "https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qg",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qg"
        },
        {
          "name": "https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6e",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6e"
        },
        {
          "name": "https://github.com/yt-dlp/yt-dlp/commit/ff07792676f404ffff6ee61b5638c9dc1a33a37a",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/yt-dlp/yt-dlp/commit/ff07792676f404ffff6ee61b5638c9dc1a33a37a"
        },
        {
          "name": "https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11"
        },
        {
          "name": "https://github.com/yt-dlp/yt-dlp/releases/tag/2024.04.09",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/yt-dlp/yt-dlp/releases/tag/2024.04.09"
        },
        {
          "url": "https://www.kb.cert.org/vuls/id/123335"
        }
      ],
      "source": {
        "advisory": "GHSA-hjq6-52gw-2g7p",
        "discovery": "UNKNOWN"
      },
      "title": "yt-dlp `--exec` command injection when using `%q` in yt-dlp on Windows"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2024-22423",
    "datePublished": "2024-04-09T17:22:58.751Z",
    "dateReserved": "2024-01-10T15:09:55.556Z",
    "dateUpdated": "2025-02-13T17:33:45.700Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "fkie_nvd": {
      "descriptions": "[{\"lang\": \"en\", \"value\": \"yt-dlp is a youtube-dl fork with additional features and fixes. The patch that addressed CVE-2023-40581 attempted to prevent RCE when using `--exec` with `%q` by replacing double quotes with two double quotes. However, this escaping is not sufficient, and still allows expansion of environment variables. Support for output template expansion in `--exec`, along with this vulnerable behavior, was added to `yt-dlp` in version 2021.04.11. yt-dlp version 2024.04.09 fixes this issue by properly escaping `%`. It replaces them with `%%cd:~,%`, a variable that expands to nothing, leaving only the leading percent. It is recommended to upgrade yt-dlp to version 2024.04.09 as soon as possible. Also, always be careful when using `--exec`, because while this specific vulnerability has been patched, using unvalidated input in shell commands is inherently dangerous. For Windows users who are not able to upgrade, avoid using any output template expansion in `--exec` other than `{}` (filepath); if expansion in `--exec` is needed, verify the fields you are using do not contain `\\\"`, `|` or `\u0026`; and/or instead of using `--exec`, write the info json and load the fields from it instead.\"}, {\"lang\": \"es\", \"value\": \"yt-dlp es una bifurcaci\\u00f3n de youtube-dl con funciones y correcciones adicionales. El parche que solucion\\u00f3 CVE-2023-40581 intent\\u00f3 evitar RCE al usar `--exec` con `%q` reemplazando comillas dobles con dos comillas dobles. Sin embargo, este escape no es suficiente y a\\u00fan permite la expansi\\u00f3n de las variables de entorno. La compatibilidad con la expansi\\u00f3n de la plantilla de salida en `--exec`, junto con este comportamiento vulnerable, se agreg\\u00f3 a `yt-dlp` en la versi\\u00f3n 2021.04.11. La versi\\u00f3n 2024.04.09 de yt-dlp soluciona este problema al escapar correctamente de `%`. Los reemplaza con `%%cd:~,%`, una variable que se expande a nada, dejando solo el porcentaje principal. Se recomienda actualizar yt-dlp a la versi\\u00f3n 2024.04.09 lo antes posible. Adem\\u00e1s, siempre tenga cuidado al usar `--exec`, porque si bien esta vulnerabilidad espec\\u00edfica ha sido parcheada, usar entradas no validadas en los comandos del shell es intr\\u00ednsecamente peligroso. Para los usuarios de Windows que no pueden actualizar, evite usar cualquier expansi\\u00f3n de plantilla de salida en `--exec` que no sea `{}` (ruta de archivo); si se necesita expansi\\u00f3n en `--exec`, verifique que los campos que est\\u00e1 usando no contengan `\\\"`, `|` o `\u0026amp;`; y/o en lugar de usar `--exec`, escriba la informaci\\u00f3n json y cargue los campos de \\u00e9l en su lugar.\"}]",
      "id": "CVE-2024-22423",
      "lastModified": "2024-11-21T08:56:15.637",
      "metrics": "{\"cvssMetricV31\": [{\"source\": \"security-advisories@github.com\", \"type\": \"Secondary\", \"cvssData\": {\"version\": \"3.1\", \"vectorString\": \"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H\", \"baseScore\": 8.3, \"baseSeverity\": \"HIGH\", \"attackVector\": \"NETWORK\", \"attackComplexity\": \"HIGH\", \"privilegesRequired\": \"NONE\", \"userInteraction\": \"REQUIRED\", \"scope\": \"CHANGED\", \"confidentialityImpact\": \"HIGH\", \"integrityImpact\": \"HIGH\", \"availabilityImpact\": \"HIGH\"}, \"exploitabilityScore\": 1.6, \"impactScore\": 6.0}]}",
      "published": "2024-04-09T18:15:08.150",
      "references": "[{\"url\": \"https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6e\", \"source\": \"security-advisories@github.com\"}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/commit/ff07792676f404ffff6ee61b5638c9dc1a33a37a\", \"source\": \"security-advisories@github.com\"}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11\", \"source\": \"security-advisories@github.com\"}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/releases/tag/2024.04.09\", \"source\": \"security-advisories@github.com\"}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qg\", \"source\": \"security-advisories@github.com\"}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p\", \"source\": \"security-advisories@github.com\"}, {\"url\": \"https://www.kb.cert.org/vuls/id/123335\", \"source\": \"security-advisories@github.com\"}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6e\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/commit/ff07792676f404ffff6ee61b5638c9dc1a33a37a\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/releases/tag/2024.04.09\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qg\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://www.kb.cert.org/vuls/id/123335\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}]",
      "sourceIdentifier": "security-advisories@github.com",
      "vulnStatus": "Awaiting Analysis",
      "weaknesses": "[{\"source\": \"security-advisories@github.com\", \"type\": \"Secondary\", \"description\": [{\"lang\": \"en\", \"value\": \"CWE-78\"}]}]"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-22423\",\"sourceIdentifier\":\"security-advisories@github.com\",\"published\":\"2024-04-09T18:15:08.150\",\"lastModified\":\"2024-11-21T08:56:15.637\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"yt-dlp is a youtube-dl fork with additional features and fixes. The patch that addressed CVE-2023-40581 attempted to prevent RCE when using `--exec` with `%q` by replacing double quotes with two double quotes. However, this escaping is not sufficient, and still allows expansion of environment variables. Support for output template expansion in `--exec`, along with this vulnerable behavior, was added to `yt-dlp` in version 2021.04.11. yt-dlp version 2024.04.09 fixes this issue by properly escaping `%`. It replaces them with `%%cd:~,%`, a variable that expands to nothing, leaving only the leading percent. It is recommended to upgrade yt-dlp to version 2024.04.09 as soon as possible. Also, always be careful when using `--exec`, because while this specific vulnerability has been patched, using unvalidated input in shell commands is inherently dangerous. For Windows users who are not able to upgrade, avoid using any output template expansion in `--exec` other than `{}` (filepath); if expansion in `--exec` is needed, verify the fields you are using do not contain `\\\"`, `|` or `\u0026`; and/or instead of using `--exec`, write the info json and load the fields from it instead.\"},{\"lang\":\"es\",\"value\":\"yt-dlp es una bifurcaci\u00f3n de youtube-dl con funciones y correcciones adicionales. El parche que solucion\u00f3 CVE-2023-40581 intent\u00f3 evitar RCE al usar `--exec` con `%q` reemplazando comillas dobles con dos comillas dobles. Sin embargo, este escape no es suficiente y a\u00fan permite la expansi\u00f3n de las variables de entorno. La compatibilidad con la expansi\u00f3n de la plantilla de salida en `--exec`, junto con este comportamiento vulnerable, se agreg\u00f3 a `yt-dlp` en la versi\u00f3n 2021.04.11. La versi\u00f3n 2024.04.09 de yt-dlp soluciona este problema al escapar correctamente de `%`. Los reemplaza con `%%cd:~,%`, una variable que se expande a nada, dejando solo el porcentaje principal. Se recomienda actualizar yt-dlp a la versi\u00f3n 2024.04.09 lo antes posible. Adem\u00e1s, siempre tenga cuidado al usar `--exec`, porque si bien esta vulnerabilidad espec\u00edfica ha sido parcheada, usar entradas no validadas en los comandos del shell es intr\u00ednsecamente peligroso. Para los usuarios de Windows que no pueden actualizar, evite usar cualquier expansi\u00f3n de plantilla de salida en `--exec` que no sea `{}` (ruta de archivo); si se necesita expansi\u00f3n en `--exec`, verifique que los campos que est\u00e1 usando no contengan `\\\"`, `|` o `\u0026amp;`; y/o en lugar de usar `--exec`, escriba la informaci\u00f3n json y cargue los campos de \u00e9l en su lugar.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H\",\"baseScore\":8.3,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"HIGH\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"REQUIRED\",\"scope\":\"CHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.6,\"impactScore\":6.0}]},\"weaknesses\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-78\"}]}],\"references\":[{\"url\":\"https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6e\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/yt-dlp/yt-dlp/commit/ff07792676f404ffff6ee61b5638c9dc1a33a37a\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/yt-dlp/yt-dlp/releases/tag/2024.04.09\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qg\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://www.kb.cert.org/vuls/id/123335\",\"source\":\"security-advisories@github.com\"},{\"url\":\"https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6e\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://github.com/yt-dlp/yt-dlp/commit/ff07792676f404ffff6ee61b5638c9dc1a33a37a\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://github.com/yt-dlp/yt-dlp/releases/tag/2024.04.09\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qg\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://www.kb.cert.org/vuls/id/123335\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p\", \"name\": \"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p\", \"tags\": [\"x_refsource_CONFIRM\", \"x_transferred\"]}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qg\", \"name\": \"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qg\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6e\", \"name\": \"https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6e\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/commit/ff07792676f404ffff6ee61b5638c9dc1a33a37a\", \"name\": \"https://github.com/yt-dlp/yt-dlp/commit/ff07792676f404ffff6ee61b5638c9dc1a33a37a\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11\", \"name\": \"https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/releases/tag/2024.04.09\", \"name\": \"https://github.com/yt-dlp/yt-dlp/releases/tag/2024.04.09\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://www.kb.cert.org/vuls/id/123335\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-01T22:43:34.950Z\"}}, {\"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-22423\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-04-10T19:34:51.632333Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-05-23T19:01:23.024Z\"}, \"title\": \"CISA ADP Vulnrichment\"}], \"cna\": {\"title\": \"yt-dlp `--exec` command injection when using `%q` in yt-dlp on Windows\", \"source\": {\"advisory\": \"GHSA-hjq6-52gw-2g7p\", \"discovery\": \"UNKNOWN\"}, \"metrics\": [{\"cvssV3_1\": {\"scope\": \"CHANGED\", \"version\": \"3.1\", \"baseScore\": 8.4, \"attackVector\": \"NETWORK\", \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H\", \"integrityImpact\": \"HIGH\", \"userInteraction\": \"REQUIRED\", \"attackComplexity\": \"HIGH\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"NONE\", \"confidentialityImpact\": \"HIGH\"}}], \"affected\": [{\"vendor\": \"yt-dlp\", \"product\": \"yt-dlp\", \"versions\": [{\"status\": \"affected\", \"version\": \"\u003e= 2021.04.11, \u003c 2024.04.09\"}]}], \"references\": [{\"url\": \"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p\", \"name\": \"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-hjq6-52gw-2g7p\", \"tags\": [\"x_refsource_CONFIRM\"]}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qg\", \"name\": \"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-42h4-v29r-42qg\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6e\", \"name\": \"https://github.com/yt-dlp/yt-dlp/commit/de015e930747165dbb8fcd360f8775fd973b7d6e\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/commit/ff07792676f404ffff6ee61b5638c9dc1a33a37a\", \"name\": \"https://github.com/yt-dlp/yt-dlp/commit/ff07792676f404ffff6ee61b5638c9dc1a33a37a\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11\", \"name\": \"https://github.com/yt-dlp/yt-dlp/releases/tag/2021.04.11\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/yt-dlp/yt-dlp/releases/tag/2024.04.09\", \"name\": \"https://github.com/yt-dlp/yt-dlp/releases/tag/2024.04.09\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://www.kb.cert.org/vuls/id/123335\"}], \"descriptions\": [{\"lang\": \"en\", \"value\": \"yt-dlp is a youtube-dl fork with additional features and fixes. The patch that addressed CVE-2023-40581 attempted to prevent RCE when using `--exec` with `%q` by replacing double quotes with two double quotes. However, this escaping is not sufficient, and still allows expansion of environment variables. Support for output template expansion in `--exec`, along with this vulnerable behavior, was added to `yt-dlp` in version 2021.04.11. yt-dlp version 2024.04.09 fixes this issue by properly escaping `%`. It replaces them with `%%cd:~,%`, a variable that expands to nothing, leaving only the leading percent. It is recommended to upgrade yt-dlp to version 2024.04.09 as soon as possible. Also, always be careful when using `--exec`, because while this specific vulnerability has been patched, using unvalidated input in shell commands is inherently dangerous. For Windows users who are not able to upgrade, avoid using any output template expansion in `--exec` other than `{}` (filepath); if expansion in `--exec` is needed, verify the fields you are using do not contain `\\\"`, `|` or `\u0026`; and/or instead of using `--exec`, write the info json and load the fields from it instead.\"}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-78\", \"description\": \"CWE-78: Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)\"}]}], \"providerMetadata\": {\"orgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"shortName\": \"GitHub_M\", \"dateUpdated\": \"2024-04-09T17:22:58.751Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-22423\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-08-01T22:43:34.950Z\", \"dateReserved\": \"2024-01-10T15:09:55.556Z\", \"assignerOrgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"datePublished\": \"2024-04-09T17:22:58.751Z\", \"assignerShortName\": \"GitHub_M\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


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 observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…