Common Weakness Enumeration

CWE-77

Allowed-with-Review

Improper Neutralization of Special Elements used in a Command ('Command Injection')

Abstraction: Class · Status: Draft

The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.

5383 vulnerabilities reference this CWE, most recent first.

GHSA-2J3H-J2Q3-WXP3

Vulnerability from github – Published: 2024-02-26 18:30 – Updated: 2025-11-04 21:31
VLAI
Details

Splinefont in FontForge through 20230101 allows command injection via crafted archives or compressed files.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-25082"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-02-26T16:27:58Z",
    "severity": "MODERATE"
  },
  "details": "Splinefont in FontForge through 20230101 allows command injection via crafted archives or compressed files.",
  "id": "GHSA-2j3h-j2q3-wxp3",
  "modified": "2025-11-04T21:31:13Z",
  "published": "2024-02-26T18:30:31Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-25082"
    },
    {
      "type": "WEB",
      "url": "https://github.com/fontforge/fontforge/pull/5367"
    },
    {
      "type": "WEB",
      "url": "https://fontforge.org/en-US/downloads"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2024/03/msg00007.html"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GCH22HIO2C6M4BZWF5EYIWVFBXL5BQAH"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GCH22HIO2C6M4BZWF5EYIWVFBXL5BQAH"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2024/03/08/2"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-2J55-PCW5-X4H2

Vulnerability from github – Published: 2018-08-13 15:02 – Updated: 2023-01-18 21:33
VLAI
Summary
active-support impersonates 'activesupport' gem
Details

The active-support ruby gem gem is malware and duplicates the official activesupport (no hyphen) gem, but adds a compiled extension. The extension attempts to resolve a base64 encoded domain (29faea63.planfhntage.de), downloads a payload, and executes.

This trojan horse gem could allow a remote attacker to execute arbitrary code on the system, caused by containing a malicious backdoor. An attacker could exploit this vulnerability to execute arbitrary code on the system. No version of this gem should be considered safe.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "RubyGems",
        "name": "active-support"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2018-3779"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T20:52:19Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "The `active-support` ruby gem gem is malware and duplicates the official `activesupport` (no hyphen) gem, but adds a compiled extension. The extension attempts to resolve a base64 encoded domain (29faea63.planfhntage.de), downloads a payload, and executes.\n \nThis trojan horse gem could allow a remote attacker to execute arbitrary code on the system, caused by containing a malicious backdoor. An attacker could exploit this vulnerability to execute arbitrary code on the system.  No version of this gem should be considered safe.",
  "id": "GHSA-2j55-pcw5-x4h2",
  "modified": "2023-01-18T21:33:05Z",
  "published": "2018-08-13T15:02:49Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-3779"
    },
    {
      "type": "WEB",
      "url": "https://hackerone.com/reports/392311"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-2j55-pcw5-x4h2"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "active-support impersonates \u0027activesupport\u0027 gem"
}

GHSA-2J8H-V2CV-QH49

Vulnerability from github – Published: 2026-04-06 06:30 – Updated: 2026-04-06 06:30
VLAI
Details

A vulnerability was found in ChrisChinchilla Vale-MCP up to 0.1.0. Affected by this vulnerability is an unknown functionality of the file src/index.ts of the component HTTP Interface. The manipulation of the argument config_path results in os command injection. Attacking locally is a requirement. The exploit has been made public and could be used. The vendor was contacted early about this disclosure but did not respond in any way.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-5621"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-04-06T05:16:02Z",
    "severity": "MODERATE"
  },
  "details": "A vulnerability was found in ChrisChinchilla Vale-MCP up to 0.1.0. Affected by this vulnerability is an unknown functionality of the file src/index.ts of the component HTTP Interface. The manipulation of the argument config_path results in os command injection. Attacking locally is a requirement. The exploit has been made public and could be used. The vendor was contacted early about this disclosure but did not respond in any way.",
  "id": "GHSA-2j8h-v2cv-qh49",
  "modified": "2026-04-06T06:30:29Z",
  "published": "2026-04-06T06:30:29Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-5621"
    },
    {
      "type": "WEB",
      "url": "https://github.com/wing3e/public_exp/issues/27"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/submit/785591"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/vuln/355411"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/vuln/355411/cti"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
      "type": "CVSS_V4"
    }
  ]
}

GHSA-2JFG-R68G-P4GM

Vulnerability from github – Published: 2024-06-25 21:31 – Updated: 2024-09-07 00:31
VLAI
Details

In WhatsUp Gold versions released before 2023.1.3, an unauthenticated Remote Code Execution vulnerability in Progress WhatsUpGold.  The Apm.UI.Areas.APM.Controllers.CommunityController

allows execution of commands with iisapppool\nmconsole privileges.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-4884"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-06-25T20:15:12Z",
    "severity": "CRITICAL"
  },
  "details": "In WhatsUp Gold versions released before 2023.1.3,\u00a0an unauthenticated Remote Code Execution vulnerability in Progress WhatsUpGold.\u00a0\u00a0The Apm.UI.Areas.APM.Controllers.CommunityController\n\n allows execution of commands with iisapppool\\nmconsole privileges.",
  "id": "GHSA-2jfg-r68g-p4gm",
  "modified": "2024-09-07T00:31:28Z",
  "published": "2024-06-25T21:31:16Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-4884"
    },
    {
      "type": "WEB",
      "url": "https://community.progress.com/s/article/WhatsUp-Gold-Security-Bulletin-June-2024"
    },
    {
      "type": "WEB",
      "url": "https://www.progress.com/network-monitoring"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-2JG7-CR9W-6GW3

Vulnerability from github – Published: 2022-05-17 02:38 – Updated: 2022-05-17 02:38
VLAI
Details

default-rsyncssh.lua in Lsyncd 2.1.5 and earlier allows remote attackers to execute arbitrary commands via shell metacharacters in a filename.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2014-8990"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2014-12-05T16:59:00Z",
    "severity": "HIGH"
  },
  "details": "default-rsyncssh.lua in Lsyncd 2.1.5 and earlier allows remote attackers to execute arbitrary commands via shell metacharacters in a filename.",
  "id": "GHSA-2jg7-cr9w-6gw3",
  "modified": "2022-05-17T02:38:54Z",
  "published": "2022-05-17T02:38:54Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2014-8990"
    },
    {
      "type": "WEB",
      "url": "https://github.com/axkibe/lsyncd/issues/220"
    },
    {
      "type": "WEB",
      "url": "https://github.com/axkibe/lsyncd/commit/18f02ad013b41a72753912155ae2ba72f2a53e52"
    },
    {
      "type": "WEB",
      "url": "https://github.com/axkibe/lsyncd/commit/e6016b3748370878778b8f0b568d5281cc248aa4"
    },
    {
      "type": "WEB",
      "url": "https://security.gentoo.org/glsa/201702-05"
    },
    {
      "type": "WEB",
      "url": "http://lists.fedoraproject.org/pipermail/package-announce/2014-December/145114.html"
    },
    {
      "type": "WEB",
      "url": "http://lists.fedoraproject.org/pipermail/package-announce/2014-December/145131.html"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/62321"
    },
    {
      "type": "WEB",
      "url": "http://www.debian.org/security/2015/dsa-3130"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2014/11/19/1"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2014/11/20/5"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/71179"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-2JH5-G5CH-43Q5

Vulnerability from github – Published: 2025-04-23 22:25 – Updated: 2025-04-24 19:20
VLAI
Summary
YoutubeDLSharp allows command injection on windows system due to non sanitized arguments
Details

Summary

This vulnerability only apply when running on a Windows OS. An unsafe conversion of arguments allows the injection of a malicous commands when starting yt-dlp from a commands prompt.

[!CAUTION] NOTE THAT DEPENDING ON THE CONTEXT AND WHERE THE LIBRARY IS USED, THIS MAY HAVE MORE SEVERE CONSEQUENCES. FOR EXAMPLE, A USER USING THE LIBRARY LOCALLY IS A LOT LESS VULNERABLE THAN AN ASP.NET APPLICATION ACCEPTING INPUTS FROM A NETWORK/INTERNET.

Details

The vulnerability have been implemented in a commit (https://github.com/Bluegrams/YoutubeDLSharp/commit/fdf3256da18d0e2da4a2f33ad4a1b72ff8273a50) 3 year ago to fix a issue with unicode characters on Windows. ( In the latest version at the time of writing this, the code seems to have moved here : https://github.com/Bluegrams/YoutubeDLSharp/blob/b2f7968a2ef06a9c7b2c212785cfeac0b187b6d8/YoutubeDLSharp/YoutubeDLProcess.cs#L87 ) In this commit, a new way of starting yt-dlp was implemented, method that was defined as the default behaviour.

When the internal method ConvertToArgs get called, the application will test multiples conditions to decide on how the yt-dlp application should be started. The condition we are interesed in, as well a the default one on Windows, is at line 99 . Inside the if statement, we can see that insead of directly calling the yt-dlp binary, a command prompt is opened to run yt-dlp.

The problem arises when you realize that both arguments in the ConvertToArgs method may be provided by an untrusted client. Since the documentation of YoutubeDLSharp does not warn developers about this behavior, they might assume that the library handles this safely by ensuring that the arguments are secure to run inside a command prompt. Instead, the two potentially malicious arguments are directly appended to the command string without any sanitization (see line 104 and 107).

PoC

For this example, I'm going to use the version 1.1.1 and a method inside YoutubeDL.cs. Assuming you are running on a Windows OS, this method will by default use a CMD to open yt-dlp.

using YoutubeDLSharp;

public async Task<RunResult<VideoData>> GetMediaInformation()
{
        YoutubeDL youtubeDl = new YoutubeDL();
    // Fetch media information using a badly crafted "url" (escaped)
    return await youtubeDl.RunVideoDataFetch("https://example.com/\" & start calc.exe");
}

At the call of GetMediaInformation, the method RunVideoDataFetch will be called, internally this method will call the vulnerable method [ConvertToArgs] resulting in the following string:

/C chcp 65001 >nul 2>&1 && "yt-dlp.exe"  --external-downloader "m3u8:native" --external-downloader-args "ffmpeg:-nostats -loglevel 0" -o "C:\Users\<hidden>\Documents\GitHub\<hidden>\<hidden>\bin\Release\net8.0\%(title)s [%(id)s]_%(epoch)s.%(ext)s" --force-overwrites --no-part -i --ignore-config --ffmpeg-location "ffmpeg.exe" --exec "echo outfile: {}" -- "https://example.com/" & start calc.exe"

[!NOTE] Some text have been replaced by <hidden> inside the command.

The important part here is at the end of the command, we can see "https://example.com/" & start calc.exe", if we compare it with our
malicious URL https://example.com/" & start calc.exe, we can see that the method added quotes at the start and the end of the string. However, our additional quote in the URL followed by the & character made it so the CMD interprets what follows the & as a new command, thus executing yt-dlp AND the very dangerous start calc.exe 😊.

Here is a screenshot of the processes using another malicious url https://example.com/" & start msinfo32 showcase

Impact

Every users running a effected version on a Windows OS with the UseWindowsEncodingWorkaround value defined to true (default behaviour). If you are using build-in methods form the YoutubeDL.cs file, the value is true by default and you cannot disable it from theses methods.

Patch

Upgrade to v.1.1.2 or higher of YoutubeDLSharp. The UseWindowsEncodingWorkaround property has been removed entirely in v.1.1.2.

Workaround

(only for v1.1.1 or lower, please upgrade to the latest version)

Using YoutubeDLProcess

If you are using a YoutubeDLProcess object directly to communicate with yt-dlp, you can disable UseWindowsEncodingWorkaround to mitigate the vulnerability. Doing so will execute the yt-dlp binary directly. However, you will lose support for Unicode characters. Example:

YoutubeDLProcess youtubeDLProc = new YoutubeDLProcess()
{
       UseWindowsEncodingWorkaround = false
};

Sanitizing url

If you want to keep support for Unicode characters or are using methods from the YoutubeDL.cs file, you would need to manually sanitize your inputs until a version with a fix is released. For URL sanitization, I managed to prevent the exploitation of the PoC by creating this method. However, I can't guarantee it would work in every case.

        public static string? SanitizeUrl(string url)
        {
            // Parse the URL using Uri
            if (Uri.TryCreate(url, UriKind.Absolute, out Uri? urlUri))
            {
                // According to the microsoft docs getting the absolute url append
                // all of the others fields, theses fields get URI escaped when you GET them
                // (https://learn.microsoft.com/en-us/dotnet/api/system.uri.query?view=net-8.0#remarks) 
                return urlUri.AbsoluteUri;
            }
            // Invalid url format
            return null;
        }

This works because Uri properties have special characters like spaces and " escaped into percent numbers like %20, thus turning our malicous url into https://example.com/%22%20&%20start%20calc.exe. Note, however, that if you modify the options with which yt-dlp is run, you need to ensure every option is also sanitized (assuming they are taken from a untrusted user input). This method won't work as these options are not URLs.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "YoutubeDLSharp"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.0.0-beta4"
            },
            {
              "fixed": "1.1.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-43858"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77",
      "CWE-78"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-04-23T22:25:20Z",
    "nvd_published_at": "2025-04-24T18:15:20Z",
    "severity": "CRITICAL"
  },
  "details": "## Summary\nThis vulnerability only apply when running on a Windows OS.\nAn unsafe conversion of arguments allows the injection of a malicous commands when starting `yt-dlp` from a commands prompt.\n\n\u003e [!CAUTION]\n\u003e **NOTE THAT DEPENDING ON THE CONTEXT AND WHERE THE LIBRARY IS USED, THIS MAY HAVE MORE SEVERE CONSEQUENCES. FOR EXAMPLE, A USER USING THE LIBRARY LOCALLY IS A LOT LESS VULNERABLE THAN AN ASP.NET APPLICATION ACCEPTING INPUTS FROM A NETWORK/INTERNET.**\n\n## Details\n\nThe vulnerability have been implemented in a commit (https://github.com/Bluegrams/YoutubeDLSharp/commit/fdf3256da18d0e2da4a2f33ad4a1b72ff8273a50) 3 year ago to fix a issue with unicode characters on Windows.  ( In the latest version at the time of writing this, the code seems to have moved here : https://github.com/Bluegrams/YoutubeDLSharp/blob/b2f7968a2ef06a9c7b2c212785cfeac0b187b6d8/YoutubeDLSharp/YoutubeDLProcess.cs#L87 )\nIn this commit, a new way of starting yt-dlp was implemented, method that was defined as the default behaviour.  \n\nWhen the internal method [`ConvertToArgs`](https://github.com/Bluegrams/YoutubeDLSharp/commit/fdf3256da18d0e2da4a2f33ad4a1b72ff8273a50#diff-8ec44b4ade6ce6ed38ebf7e765dc86c426984a18304cd1cd320bf92500133c88R64) get called, the application will test multiples conditions to decide on how the yt-dlp application should be started. The condition we are interesed in, as well a the default one on Windows, is at [line 99](https://github.com/Bluegrams/YoutubeDLSharp/commit/fdf3256da18d0e2da4a2f33ad4a1b72ff8273a50#diff-8ec44b4ade6ce6ed38ebf7e765dc86c426984a18304cd1cd320bf92500133c88R99) . Inside the `if` statement, we can see that insead of directly calling the `yt-dlp` binary, a command prompt is opened to run `yt-dlp`.  \n\n**The problem arises when you realize that both arguments in the `ConvertToArgs` method may be provided by an untrusted client.** Since the documentation of YoutubeDLSharp does not warn developers about this behavior, they might assume that the library handles this safely by ensuring that the arguments are secure to run inside a command prompt. Instead, the two potentially malicious arguments are directly appended to the command string without any sanitization (see line [104](https://github.com/Bluegrams/YoutubeDLSharp/commit/fdf3256da18d0e2da4a2f33ad4a1b72ff8273a50#diff-8ec44b4ade6ce6ed38ebf7e765dc86c426984a18304cd1cd320bf92500133c88R104) and [107](https://github.com/Bluegrams/YoutubeDLSharp/commit/fdf3256da18d0e2da4a2f33ad4a1b72ff8273a50#diff-8ec44b4ade6ce6ed38ebf7e765dc86c426984a18304cd1cd320bf92500133c88R107)).\n\n\n\n## PoC\nFor this example, I\u0027m going to use the version `1.1.1` and a method inside [YoutubeDL.cs](https://github.com/Bluegrams/YoutubeDLSharp/blob/b2f7968a2ef06a9c7b2c212785cfeac0b187b6d8/YoutubeDLSharp/YoutubeDL.cs). Assuming you are running on a Windows OS, this method will by default use a CMD to open yt-dlp.\n\n```c#\nusing YoutubeDLSharp;\n\npublic async Task\u003cRunResult\u003cVideoData\u003e\u003e GetMediaInformation()\n{\n        YoutubeDL youtubeDl = new YoutubeDL();\n\t// Fetch media information using a badly crafted \"url\" (escaped)\n\treturn await youtubeDl.RunVideoDataFetch(\"https://example.com/\\\" \u0026 start calc.exe\");\n}\n```\nAt the call of `GetMediaInformation`, the method `RunVideoDataFetch` will be called, internally this method will call the vulnerable method [`ConvertToArgs`] resulting in the following string: \n```\n/C chcp 65001 \u003enul 2\u003e\u00261 \u0026\u0026 \"yt-dlp.exe\"  --external-downloader \"m3u8:native\" --external-downloader-args \"ffmpeg:-nostats -loglevel 0\" -o \"C:\\Users\\\u003chidden\u003e\\Documents\\GitHub\\\u003chidden\u003e\\\u003chidden\u003e\\bin\\Release\\net8.0\\%(title)s [%(id)s]_%(epoch)s.%(ext)s\" --force-overwrites --no-part -i --ignore-config --ffmpeg-location \"ffmpeg.exe\" --exec \"echo outfile: {}\" -- \"https://example.com/\" \u0026 start calc.exe\"\n```\n\u003e[!NOTE]\n\u003e Some text have been replaced by `\u003chidden\u003e` inside the command.\n\nThe important part here is at the end of the command, we can see `\"https://example.com/\" \u0026 start calc.exe\"`, if we compare it with our  \nmalicious URL `https://example.com/\" \u0026 start calc.exe`, we can see that the method added quotes at the start and the end of the string. However, our additional quote in the URL followed by the `\u0026` character made it so the CMD interprets what follows the `\u0026` as a new command, thus executing `yt-dlp` **AND** the *very* dangerous `start calc.exe` \ud83d\ude0a.\n\nHere is a screenshot of the processes using another malicious url `https://example.com/\" \u0026 start msinfo32`\n![showcase](https://github.com/user-attachments/assets/d6f5513c-a69b-4cdd-9820-3f4d71b5c457)\n\n## Impact\nEvery users running a effected version on a Windows OS with the [`UseWindowsEncodingWorkaround`](https://github.com/Bluegrams/YoutubeDLSharp/commit/fdf3256da18d0e2da4a2f33ad4a1b72ff8273a50#diff-8ec44b4ade6ce6ed38ebf7e765dc86c426984a18304cd1cd320bf92500133c88R44) value defined to true (default behaviour). If you are using build-in methods form the [YoutubeDL.cs](https://github.com/Bluegrams/YoutubeDLSharp/blob/b2f7968a2ef06a9c7b2c212785cfeac0b187b6d8/YoutubeDLSharp/YoutubeDL.cs) file, the value is `true` by default and **you cannot disable it from theses methods**.\n\n## Patch\n\nUpgrade to **v.1.1.2 or higher** of YoutubeDLSharp. The `UseWindowsEncodingWorkaround` property has been removed entirely in v.1.1.2.\n\n## Workaround\n(only for v1.1.1 or lower, please upgrade to the latest version)\n\n### Using `YoutubeDLProcess`\nIf you are using a `YoutubeDLProcess` object directly to communicate with yt-dlp, you can disable `UseWindowsEncodingWorkaround` to mitigate the vulnerability. Doing so will execute the yt-dlp binary directly. However, you will lose support for Unicode characters.\n**Example:**\n```c#\nYoutubeDLProcess youtubeDLProc = new YoutubeDLProcess()\n{\n       UseWindowsEncodingWorkaround = false\n};\n```\n\n### Sanitizing url\nIf you want to keep support for Unicode characters or are using methods from the [YoutubeDL.cs](https://github.com/Bluegrams/YoutubeDLSharp/blob/b2f7968a2ef06a9c7b2c212785cfeac0b187b6d8/YoutubeDLSharp/YoutubeDL.cs) file, you would need to manually sanitize your inputs until a version with a fix is released. For URL sanitization, I managed to prevent the exploitation of the PoC by creating this method. However, I can\u0027t guarantee it would work in every case.\n```c#\n\t\tpublic static string? SanitizeUrl(string url)\n\t\t{\n\t\t\t// Parse the URL using Uri\n\t\t\tif (Uri.TryCreate(url, UriKind.Absolute, out Uri? urlUri))\n\t\t\t{\n\t\t\t\t// According to the microsoft docs getting the absolute url append\n\t\t\t\t// all of the others fields, theses fields get URI escaped when you GET them\n\t\t\t\t// (https://learn.microsoft.com/en-us/dotnet/api/system.uri.query?view=net-8.0#remarks) \n\t\t\t\treturn urlUri.AbsoluteUri;\n\t\t\t}\n\t\t\t// Invalid url format\n\t\t\treturn null;\n\t\t}\n```\nThis works because Uri properties have special characters like spaces and `\"` escaped into percent numbers like `%20`, thus turning our malicous url into `https://example.com/%22%20\u0026%20start%20calc.exe`.\n**Note, however, that if you modify the options with which yt-dlp is run, you need to ensure every option is also sanitized (assuming they are taken from a untrusted user input). This method won\u0027t work as these options are not URLs.**",
  "id": "GHSA-2jh5-g5ch-43q5",
  "modified": "2025-04-24T19:20:03Z",
  "published": "2025-04-23T22:25:20Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/Bluegrams/YoutubeDLSharp/security/advisories/GHSA-2jh5-g5ch-43q5"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-43858"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Bluegrams/YoutubeDLSharp/commit/b6051372bd5af30f95f73de47d9bc71c3a07de0f"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Bluegrams/YoutubeDLSharp/commit/fdf3256da18d0e2da4a2f33ad4a1b72ff8273a50"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/Bluegrams/YoutubeDLSharp"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "YoutubeDLSharp allows command injection on windows system due to non sanitized arguments"
}

GHSA-2JJ3-H6G5-P92F

Vulnerability from github – Published: 2023-08-07 21:31 – Updated: 2024-04-04 06:36
VLAI
Details

Netgear WG302v2 v5.2.9 and WAG302v2 v5.1.19 were discovered to contain multiple command injection vulnerabilities in the upgrade_handler function via the firmwareRestore and firmwareServerip parameters.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-38921"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-08-07T19:15:10Z",
    "severity": "HIGH"
  },
  "details": "Netgear WG302v2 v5.2.9 and WAG302v2 v5.1.19 were discovered to contain multiple command injection vulnerabilities in the upgrade_handler function via the firmwareRestore and firmwareServerip parameters.",
  "id": "GHSA-2jj3-h6g5-p92f",
  "modified": "2024-04-04T06:36:12Z",
  "published": "2023-08-07T21:31:03Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-38921"
    },
    {
      "type": "WEB",
      "url": "https://github.com/FirmRec/IoT-Vulns/tree/main/netgear/upgrade_handler"
    },
    {
      "type": "WEB",
      "url": "https://www.netgear.com/about/security"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-2M3V-5CCR-MRMF

Vulnerability from github – Published: 2024-08-17 15:30 – Updated: 2024-09-27 00:31
VLAI
Details

A vulnerability classified as critical has been found in Tosei Online Store Management System ネット店舗管理システム 4.02/4.03/4.04. This affects an unknown part of the file /cgi-bin/tosei_kikai.php. The manipulation of the argument kikaibangou leads to command injection. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. NOTE: The vendor was contacted early about this disclosure but did not respond in any way.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-7897"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-08-17T15:15:11Z",
    "severity": "MODERATE"
  },
  "details": "A vulnerability classified as critical has been found in Tosei Online Store Management System \u30cd\u30c3\u30c8\u5e97\u8217\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0 4.02/4.03/4.04. This affects an unknown part of the file /cgi-bin/tosei_kikai.php. The manipulation of the argument kikaibangou leads to command injection. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. NOTE: The vendor was contacted early about this disclosure but did not respond in any way.",
  "id": "GHSA-2m3v-5ccr-mrmf",
  "modified": "2024-09-27T00:31:04Z",
  "published": "2024-08-17T15:30:24Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-7897"
    },
    {
      "type": "WEB",
      "url": "https://gist.github.com/b0rgch3n/bb47a1ed6f66c1e8c7a80f210f4ac8ef"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?ctiid.274905"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?id.274905"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?submit.387406"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
      "type": "CVSS_V4"
    }
  ]
}

GHSA-2M44-793W-9X5C

Vulnerability from github – Published: 2024-09-06 18:31 – Updated: 2024-09-07 00:31
VLAI
Details

D-Link DI-8100G 17.12.20A1 is vulnerable to Command Injection via sub47A60C function in the upgrade_filter.asp file

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-44401"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-09-06T16:15:03Z",
    "severity": "CRITICAL"
  },
  "details": "D-Link DI-8100G 17.12.20A1 is vulnerable to Command Injection via sub47A60C function in the upgrade_filter.asp file",
  "id": "GHSA-2m44-793w-9x5c",
  "modified": "2024-09-07T00:31:28Z",
  "published": "2024-09-06T18:31:30Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-44401"
    },
    {
      "type": "WEB",
      "url": "https://github.com/lonelylonglong/openfile-/blob/main/D-link_DI_8100GA1_Command_Injection.md/CVE-2024-44401"
    },
    {
      "type": "WEB",
      "url": "https://github.com/lonelylonglong/openfile-/blob/main/D-link_DI_8100GA1_Command_Injection.md/D-link_DI_8100GA1_Command_Injection.md"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-2M4J-6GVX-869P

Vulnerability from github – Published: 2022-05-24 17:47 – Updated: 2022-05-24 17:47
VLAI
Details

An exploitable unatuhenticated command injection exists in the OpenClinic GA 5.173.3. Specially crafted web requests can cause commands to be executed on the server. An attacker can send a web request with parameters containing specific parameter to trigger this vulnerability, potentially allowing exfiltration of the database, user credentials and compromise underlying operating system.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2020-27227"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77",
      "CWE-78"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-04-13T15:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "An exploitable unatuhenticated command injection exists in the OpenClinic GA 5.173.3. Specially crafted web requests can cause commands to be executed on the server. An attacker can send a web request with parameters containing specific parameter to trigger this vulnerability, potentially allowing exfiltration of the database, user credentials and compromise underlying operating system.",
  "id": "GHSA-2m4j-6gvx-869p",
  "modified": "2022-05-24T17:47:10Z",
  "published": "2022-05-24T17:47:10Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-27227"
    },
    {
      "type": "WEB",
      "url": "https://talosintelligence.com/vulnerability_reports/TALOS-2020-1203"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

Mitigation
Architecture and Design

If at all possible, use library calls rather than external processes to recreate the desired functionality.

Mitigation
Implementation

If possible, ensure that all external commands called from the program are statically created.

Mitigation MIT-5
Implementation

Strategy: Input Validation

  • Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
Mitigation
Operation

Run time: Run time policy enforcement may be used in an allowlist fashion to prevent use of any non-sanctioned commands.

Mitigation
System Configuration

Assign permissions that prevent the user from accessing/opening privileged files.

CAPEC-136: LDAP Injection

An attacker manipulates or crafts an LDAP query for the purpose of undermining the security of the target. Some applications use user input to create LDAP queries that are processed by an LDAP server. For example, a user might provide their username during authentication and the username might be inserted in an LDAP query during the authentication process. An attacker could use this input to inject additional commands into an LDAP query that could disclose sensitive information. For example, entering a * in the aforementioned query might return information about all users on the system. This attack is very similar to an SQL injection attack in that it manipulates a query to gather additional information or coerce a particular return value.

CAPEC-15: Command Delimiters

An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or denylist input validation, as opposed to allowlist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or denylist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.

CAPEC-183: IMAP/SMTP Command Injection

An adversary exploits weaknesses in input validation on web-mail servers to execute commands on the IMAP/SMTP server. Web-mail servers often sit between the Internet and the IMAP or SMTP mail server. User requests are received by the web-mail servers which then query the back-end mail server for the requested information and return this response to the user. In an IMAP/SMTP command injection attack, mail-server commands are embedded in parts of the request sent to the web-mail server. If the web-mail server fails to adequately sanitize these requests, these commands are then sent to the back-end mail server when it is queried by the web-mail server, where the commands are then executed. This attack can be especially dangerous since administrators may assume that the back-end server is protected against direct Internet access and therefore may not secure it adequately against the execution of malicious commands.

CAPEC-248: Command Injection

An adversary looking to execute a command of their choosing, injects new items into an existing command thus modifying interpretation away from what was intended. Commands in this context are often standalone strings that are interpreted by a downstream component and cause specific responses. This type of attack is possible when untrusted values are used to build these command strings. Weaknesses in input validation or command construction can enable the attack and lead to successful exploitation.

CAPEC-40: Manipulating Writeable Terminal Devices

This attack exploits terminal devices that allow themselves to be written to by other users. The attacker sends command strings to the target terminal device hoping that the target user will hit enter and thereby execute the malicious command with their privileges. The attacker can send the results (such as copying /etc/passwd) to a known directory and collect once the attack has succeeded.

CAPEC-43: Exploiting Multiple Input Interpretation Layers

An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: <parser1> --> <input validator> --> <parser2>. In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.

CAPEC-75: Manipulating Writeable Configuration Files

Generally these are manually edited files that are not in the preview of the system administrators, any ability on the attackers' behalf to modify these files, for example in a CVS repository, gives unauthorized access directly to the application, the same as authorized users.

CAPEC-76: Manipulating Web Input to File System Calls

An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.