CWE-77
Weakness Allowed-with-ReviewImproper Neutralization of Special Elements used in a Command
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.
Many protocols and products have their own custom command language. While OS or shell command strings are frequently discovered and targeted, developers may not realize that these other command languages might also be vulnerable to attacks.
Dimensions
- Behavior-Property: Improper
- Behavior-Type: Neutralization
- Input-Type: Special Elements
- Other: Command
- Common-Name: Command Injection
Mapping guidance
CWE-77 is often misused when OS command injection (CWE-78) was intended instead [REF-1287].
Ensure that the analysis focuses on the root-cause error that allows the execution of commands, as there are many weaknesses that can lead to this consequence. See Terminology Notes. If the weakness involves a command language besides OS shell invocation, then CWE-77 could be used.
Relationships and members
Modes of introduction
Command injection vulnerabilities typically occur when:
Data enters the application from an untrusted source.
The data is part of a string that is executed as a command by the application.
REALIZATION: This weakness is caused during implementation of an architectural security tactic.
Detection methods
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Effectiveness: High
Notes
Terminology
The "command injection" phrase carries different meanings, either as an attack or as a technical impact. The most common usage of "command injection" refers to the more-accurate OS command injection (CWE-78), but there are many command languages.
In vulnerability-focused analysis, the phrase may refer to any situation in which the adversary can execute commands of their own choosing, i.e., the focus is on the risk and/or technical impact of exploitation. Many proof-of-concept exploits focus on the ability to execute commands and may emphasize "command injection." However, there are dozens of weaknesses that can allow execution of commands. That is, the ability to execute commands could be resultant from another weakness.
To some, "command injection" can include cases in which the functionality intentionally allows the user to specify an entire command, which is then executed. In this case, the root cause weakness might be related to missing or incorrect authorization, since an adversary should not be able to specify arbitrary commands, but some users or admins are allowed.
CWE-77 and its descendants are specifically focused on behaviors in which the product is intentionally building a command to execute, and the adversary can inject separators into the command or otherwise change the command being executed.
Other
Command injection is a common problem with wrapper programs.
Content history
reported typo in Terminology note
Provided diagram to improve CWE usability
Suggested that CWE-77 should include more examples than CWE-78.
updated Time_of_Introduction
Suggested OWASP Top Ten 2004 mapping
updated Common_Consequences, Relationships, Other_Notes, Taxonomy_Mappings, Weakness_Ordinalities
updated Demonstrative_Examples, Name
updated Demonstrative_Examples, Description, Name
updated Common_Consequences, Description, Other_Notes, Potential_Mitigations
updated Potential_Mitigations, Relationships
updated Description, Name
updated Demonstrative_Examples
updated Common_Consequences
updated Common_Consequences, Demonstrative_Examples, References, Related_Attack_Patterns, Relationships
updated Potential_Mitigations
updated Relationships
updated Relationships
updated Applicable_Platforms, Demonstrative_Examples, Description, Other_Notes, Terminology_Notes
updated Relationships
updated Relationships, Taxonomy_Mappings
updated Demonstrative_Examples, Relationships
updated Potential_Mitigations, Related_Attack_Patterns, Relationships
updated Causal_Nature, Likelihood_of_Exploit, Modes_of_Introduction, References, Relationships, Taxonomy_Mappings
updated Relationships
updated Taxonomy_Mappings
updated Related_Attack_Patterns, Relationships
updated Potential_Mitigations, References, Relationships
updated Potential_Mitigations
updated Relationships
updated Relationships
updated Relationships
updated Description, Observed_Examples, Relationships
updated Relationships
updated Observed_Examples, Relationships
updated Observed_Examples, References, Terminology_Notes
updated Description, Potential_Mitigations
updated Detection_Factors, Relationships, Time_of_Introduction
updated Mapping_Notes, Relationships
updated Alternate_Terms, Applicable_Platforms, Common_Consequences, Demonstrative_Examples, Description, Diagram, Mapping_Notes, Modes_of_Introduction, Observed_Examples, Other_Notes, Terminology_Notes
updated Demonstrative_Examples, Relationships
updated Relationships
updated Relationships
updated Demonstrative_Examples, Dimensions, Name, Observed_Examples, References
6175 vulnerabilities reference this CWE, most recent first.
GHSA-X8C2-XF69-CQ6V
Vulnerability from github – Published: 2026-08-03 21:31 – Updated: 2026-08-03 21:31A vulnerability was determined in Sangfor Operation and Maintenance Security Management System up to 3.0.13. Affected by this vulnerability is the function com.sbr.fort.foreignDP.DpLoginController of the file /fort/portal_login of the component Login Endpoint. This manipulation causes os command injection. The attack can be initiated remotely. The exploit has been publicly disclosed and may be utilized. The vendor was contacted early about this disclosure but did not respond in any way.
{
"affected": [],
"aliases": [
"CVE-2026-18641"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-03T20:17:16Z",
"severity": "MODERATE"
},
"details": "A vulnerability was determined in Sangfor Operation and Maintenance Security Management System up to 3.0.13. Affected by this vulnerability is the function com.sbr.fort.foreignDP.DpLoginController of the file /fort/portal_login of the component Login Endpoint. This manipulation causes os command injection. The attack can be initiated remotely. The exploit has been publicly disclosed and may be utilized. The vendor was contacted early about this disclosure but did not respond in any way.",
"id": "GHSA-x8c2-xf69-cq6v",
"modified": "2026-08-03T21:31:37Z",
"published": "2026-08-03T21:31:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-18641"
},
{
"type": "WEB",
"url": "https://github.com/lkua-1/cve/issues/1"
},
{
"type": "WEB",
"url": "https://vuldb.com/cve/CVE-2026-18641"
},
{
"type": "WEB",
"url": "https://vuldb.com/submit/853189"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/385562"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/385562/cti"
}
],
"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:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/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-X8G4-4Q7F-5FWX
Vulnerability from github – Published: 2022-05-13 01:13 – Updated: 2022-05-13 01:13MySQL before 5.1.48 allows remote authenticated users with alter database privileges to cause a denial of service (server crash and database loss) via an ALTER DATABASE command with a #mysql50# string followed by a . (dot), .. (dot dot), ../ (dot dot slash) or similar sequence, and an UPGRADE DATA DIRECTORY NAME command, which causes MySQL to move certain directories to the server data directory.
{
"affected": [],
"aliases": [
"CVE-2010-2008"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-07-13T20:30:00Z",
"severity": "LOW"
},
"details": "MySQL before 5.1.48 allows remote authenticated users with alter database privileges to cause a denial of service (server crash and database loss) via an ALTER DATABASE command with a #mysql50# string followed by a . (dot), .. (dot dot), ../ (dot dot slash) or similar sequence, and an UPGRADE DATA DIRECTORY NAME command, which causes MySQL to move certain directories to the server data directory.",
"id": "GHSA-x8g4-4q7f-5fwx",
"modified": "2022-05-13T01:13:45Z",
"published": "2022-05-13T01:13:45Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-2008"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A11869"
},
{
"type": "WEB",
"url": "http://bugs.mysql.com/bug.php?id=53804"
},
{
"type": "WEB",
"url": "http://dev.mysql.com/doc/refman/5.1/en/news-5-1-48.html"
},
{
"type": "WEB",
"url": "http://lists.fedoraproject.org/pipermail/package-announce/2010-July/044546.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/40333"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/40762"
},
{
"type": "WEB",
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2010:155"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/41198"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1024160"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-1017-1"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-1397-1"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/1918"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-X8Q7-6C7M-52GW
Vulnerability from github – Published: 2026-11-19 23:55 – Updated: 2026-11-19 23:55Summary
NLTK 3.10.3 contains security hardening intended to close JVM argument-injection and untrusted JAR/classpath execution paths in nltk.internals.java(), including the issue published as GHSA-m4rf-3fr8-xwx3.
The patched options channel correctly rejects Java argument-file references such as @/path/to/args and launcher modes such as -jar. However, an additional argument channel remains: the caller-provided cmd sequence is appended to the Java command after the validated option and classpath channels, without enforcing that its first item is a Java main-class name.
I am reporting this as an additional post-fix bypass / incomplete-fix path affecting the 3.10.3 remediation, rather than as an unrelated vulnerability family.
As a result, the same launcher token that is rejected through options can be supplied as the first cmd item. I confirmed two reachable forms against the official nltk-3.10.3-py3-none-any.whl:
- direct use of the public
nltk.internals.java()helper withcmd=["-jar", ...]; and - the higher-level
StanfordSegmenter, whose publicjava_classconstructor argument becomes the firstcmditem and accepts an@argfilelauncher token.
Both paths execute an external researcher-controlled JAR without setting NLTK_ALLOW_UNSAFE_JARS, NLTK_ALLOW_UNSAFE_CLASSPATH, or using trusted_raw_options. The original explicit outside-classpath route is blocked in 3.10.3, while the alternate command channel executes the JAR 3/3 times.
Affected artifact
Package: nltk
Confirmed affected version: 3.10.3
Wheel: nltk-3.10.3-py3-none-any.whl
SHA-256: ff9598a8e20518ee0d557745890cc4435b9578489e2dcbc69c4f81fa060caf7c
Baseline artifact:
Version: 3.10.2
Wheel: nltk-3.10.2-py3-none-any.whl
SHA-256: 2c7ccacb765c5e26b0cb60fb1b57080af522c6924d12a714a243305ba3637412
Relationship to the 3.10.3 security fixes
The existing 3.10.3 hardening validates the dedicated per-call options list before it reaches subprocess.Popen. In particular, the exact @argfile token used in this report is rejected through options with a ValueError that references CVE-2026-12841 and CWE-88.
The command is subsequently assembled in this order:
final_cmd.extend(validated_options)
if classpath_arg is not None:
final_cmd.extend(["-cp", classpath_arg])
final_cmd.extend(cmd_list)
cmd_list is copied from the public cmd argument but its first token is not checked to ensure that it is an ordinary Java main class. Java therefore interprets leading -jar, @argfile, module-mode, or classpath-mode tokens as launcher control arguments rather than application arguments.
This is an alternate argument channel around the same JVM argument/JAR execution boundary protected by the 3.10.3 changes.
Confirmed API paths
Direct public helper
nltk.internals.java(
["-jar", "/outside/trusted/roots/controlled.jar"],
classpath=None,
stdout="pipe",
stderr="pipe",
)
The external JAR executed in all three subject runs.
Higher-level StanfordSegmenter path
StanfordSegmenter exposes a public java_class constructor argument, stores it, and later places it at the beginning of the cmd sequence passed to nltk.internals.java().
A controlled argument file containing a -jar launcher invocation was supplied as:
StanfordSegmenter(
path_to_jar=trusted_segmenter_jar,
java_class="@/path/to/controlled-launcher.args",
path_to_model="dummy-model",
java_options=[],
)
The trusted segmenter JAR passed the wrapper's checksum and classpath checks. The @argfile then switched the Java launcher to the external JAR, which executed in all three runs.
The deprecated wrapper subsequently raised an unrelated post-launch AttributeError while processing its output. The external marker had already been written by the child JVM before that exception.
Proof matrix
R1 NLTK 3.10.2 + explicit external classpath
-> controlled Java bytecode executed
R2 NLTK 3.10.3 + same explicit external classpath
-> UntrustedJarError; no marker
R3A NLTK 3.10.3 + direct cmd=["-jar", external_jar]
-> controlled external JAR executed, 3/3
R3B NLTK 3.10.3 + StanfordSegmenter(java_class="@argfile")
-> controlled external JAR executed, 3/3
R4 NLTK 3.10.3 + ordinary main class in trusted classpath
-> legitimate execution preserved
A direct channel comparison also confirmed:
options=["@argfile"] -> BLOCKED
cmd/java_class="@argfile" -> EXTERNAL JAR EXECUTED
Machine-readable proof results and a portable reproducer are attached.
Preconditions
Practical exploitability depends on an embedding application exposing attacker influence over one of these public argument paths:
- the leading item of
nltk.internals.java(cmd=...); or StanfordSegmenter(java_class=...)or an equivalent wrapper-controlled command token.
The attacker must also be able to reference an argument file or JAR readable by the NLTK process. The Java child process executes with the privileges of that process.
This is not a claim that importing NLTK alone is remotely exploitable. The confirmed issue is that the default protected execution boundary can be bypassed when these argument channels are exposed to untrusted input.
Impact
Successful exploitation allows execution of attacker-selected Java bytecode with the privileges of the process using NLTK.
Suggested classifications:
- CWE-88: Improper Neutralization of Argument Delimiters in a Command
- CWE-94: Improper Control of Generation of Code
Suggested severity: Moderate, subject to maintainer assessment of realistic argument reachability in embedding applications.
Reproduction
The complete reproducer, machine-readable proof results, and proposed remediation are included in the attached evidence package.
nltk-3103-candidate-a-maintainer-evidence.zip
The included reproducer/reproduce_cmd_channel_bypass.py creates only temporary researcher-controlled Java source, JAR, argument-file, and marker artifacts. It performs no network access.
Requirements:
- Python 3.10 or newer
nltk==3.10.3- a JDK providing
java,javac, andjar
Run:
python reproducer/reproduce_cmd_channel_bypass.py
A confirmed run exits with status 0 and reports that:
- the
optionschannel blocks@argfile; - the direct
cmdchannel executes the external JAR 3/3; - the higher-level
StanfordSegmenter.java_classchannel executes it 3/3; and - legitimate trusted main-class execution remains functional.
Recommended remediation
Enforce that the first ordinary cmd item is a Java main-class token. Reject Java launcher switches and @argfile references in this channel by default, before constructing or executing the subprocess command.
For example:
cmd_list = list(cmd)
if not cmd_list:
raise ValueError("cmd must contain a Java main class")
first = cmd_list[0]
if not isinstance(first, str) or not first or first.startswith(("-", "@")):
raise ValueError("cmd must begin with a Java main class")
If raw Java launcher modes are intentionally supported, they should require a clearly named explicit trusted escape hatch rather than sharing the normal main-class channel.
The attachment includes a proposed source patch and focused regression tests. Local verification against code derived from the official 3.10.3 wheel showed:
direct -jar command channel BLOCKED
StanfordSegmenter @argfile path BLOCKED
external marker creation BLOCKED
legitimate trusted main class PRESERVED
Relationship to existing advisory / duplicate note
The public advisory GHSA-m4rf-3fr8-xwx3 describes the per-call options validation gap fixed in 3.10.3. This report is intentionally scoped as an additional bypass of that remediation through the distinct cmd/java_class argument channel.
I did not locate a public advisory, issue, or pull request describing this leading-cmd launcher-token path. I cannot determine whether an equivalent private report already exists, so please deduplicate this report against any private reports or unpublished follow-up work.
Please keep this report and attachment private while assessing and preparing any fix. I am available to test a candidate patch and adapt the regression tests to the project's preferred style.
Fix status (2026-09-28)
Status: MERGED on develop (unreleased; v3.10.3 of 2026-08-12 predates the fix).
PR: #3771 "Reject Java launcher switches and @argfiles in the java() cmd argument (CWE-88)", merged 2026-08-20, merge commit 45a08fded on develop. Fix commit: b36212795 (java() raises ValueError when the first cmd token is a launcher switch or an @argfile, and when any cmd token is an @argfile; StanfordSegmenter passes its java_class as that first token, nltk/tokenize/stanford_segmenter.py line 432, so both reported paths hit the same check).
Probe: none. Reproduction on develop 2fa3f48fe with the process spawn intercepted: cmd=["-jar", jar], cmd=["@argfile"] and cmd=["Main", "@argfile"] each raise ValueError (CWE-88) before any spawn.
Release: none yet; no release tag contains b36212795.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "nltk"
},
"ranges": [
{
"events": [
{
"introduced": "3.10.3"
},
{
"fixed": "3.10.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-128138"
],
"database_specific": {
"cwe_ids": [
"CWE-77",
"CWE-88"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-19T23:55:54Z",
"nvd_published_at": "2026-11-19T18:18:06Z",
"severity": "CRITICAL"
},
"details": "## Summary\n\nNLTK 3.10.3 contains security hardening intended to close JVM argument-injection and untrusted JAR/classpath execution paths in `nltk.internals.java()`, including the issue published as GHSA-m4rf-3fr8-xwx3.\n\nThe patched `options` channel correctly rejects Java argument-file references such as `@/path/to/args` and launcher modes such as `-jar`. However, an additional argument channel remains: the caller-provided `cmd` sequence is appended to the Java command after the validated option and classpath channels, without enforcing that its first item is a Java main-class name.\n\nI am reporting this as an additional post-fix bypass / incomplete-fix path affecting the 3.10.3 remediation, rather than as an unrelated vulnerability family.\n\nAs a result, the same launcher token that is rejected through `options` can be supplied as the first `cmd` item. I confirmed two reachable forms against the official `nltk-3.10.3-py3-none-any.whl`:\n\n1. direct use of the public `nltk.internals.java()` helper with `cmd=[\"-jar\", ...]`; and\n2. the higher-level `StanfordSegmenter`, whose public `java_class` constructor argument becomes the first `cmd` item and accepts an `@argfile` launcher token.\n\nBoth paths execute an external researcher-controlled JAR without setting `NLTK_ALLOW_UNSAFE_JARS`, `NLTK_ALLOW_UNSAFE_CLASSPATH`, or using `trusted_raw_options`. The original explicit outside-classpath route is blocked in 3.10.3, while the alternate command channel executes the JAR 3/3 times.\n\n## Affected artifact\n\n```text\nPackage: nltk\nConfirmed affected version: 3.10.3\nWheel: nltk-3.10.3-py3-none-any.whl\nSHA-256: ff9598a8e20518ee0d557745890cc4435b9578489e2dcbc69c4f81fa060caf7c\n```\n\nBaseline artifact:\n\n```text\nVersion: 3.10.2\nWheel: nltk-3.10.2-py3-none-any.whl\nSHA-256: 2c7ccacb765c5e26b0cb60fb1b57080af522c6924d12a714a243305ba3637412\n```\n\n## Relationship to the 3.10.3 security fixes\n\nThe existing 3.10.3 hardening validates the dedicated per-call `options` list before it reaches `subprocess.Popen`. In particular, the exact `@argfile` token used in this report is rejected through `options` with a `ValueError` that references CVE-2026-12841 and CWE-88.\n\nThe command is subsequently assembled in this order:\n\n```python\nfinal_cmd.extend(validated_options)\nif classpath_arg is not None:\n final_cmd.extend([\"-cp\", classpath_arg])\nfinal_cmd.extend(cmd_list)\n```\n\n`cmd_list` is copied from the public `cmd` argument but its first token is not checked to ensure that it is an ordinary Java main class. Java therefore interprets leading `-jar`, `@argfile`, module-mode, or classpath-mode tokens as launcher control arguments rather than application arguments.\n\nThis is an alternate argument channel around the same JVM argument/JAR execution boundary protected by the 3.10.3 changes.\n\n## Confirmed API paths\n\n### Direct public helper\n\n```python\nnltk.internals.java(\n [\"-jar\", \"/outside/trusted/roots/controlled.jar\"],\n classpath=None,\n stdout=\"pipe\",\n stderr=\"pipe\",\n)\n```\n\nThe external JAR executed in all three subject runs.\n\n### Higher-level `StanfordSegmenter` path\n\n`StanfordSegmenter` exposes a public `java_class` constructor argument, stores it, and later places it at the beginning of the `cmd` sequence passed to `nltk.internals.java()`.\n\nA controlled argument file containing a `-jar` launcher invocation was supplied as:\n\n```python\nStanfordSegmenter(\n path_to_jar=trusted_segmenter_jar,\n java_class=\"@/path/to/controlled-launcher.args\",\n path_to_model=\"dummy-model\",\n java_options=[],\n)\n```\n\nThe trusted segmenter JAR passed the wrapper\u0027s checksum and classpath checks. The `@argfile` then switched the Java launcher to the external JAR, which executed in all three runs.\n\nThe deprecated wrapper subsequently raised an unrelated post-launch `AttributeError` while processing its output. The external marker had already been written by the child JVM before that exception.\n\n## Proof matrix\n\n```text\nR1 NLTK 3.10.2 + explicit external classpath\n -\u003e controlled Java bytecode executed\n\nR2 NLTK 3.10.3 + same explicit external classpath\n -\u003e UntrustedJarError; no marker\n\nR3A NLTK 3.10.3 + direct cmd=[\"-jar\", external_jar]\n -\u003e controlled external JAR executed, 3/3\n\nR3B NLTK 3.10.3 + StanfordSegmenter(java_class=\"@argfile\")\n -\u003e controlled external JAR executed, 3/3\n\nR4 NLTK 3.10.3 + ordinary main class in trusted classpath\n -\u003e legitimate execution preserved\n```\n\nA direct channel comparison also confirmed:\n\n```text\noptions=[\"@argfile\"] -\u003e BLOCKED\ncmd/java_class=\"@argfile\" -\u003e EXTERNAL JAR EXECUTED\n```\n\nMachine-readable proof results and a portable reproducer are attached.\n\n## Preconditions\n\nPractical exploitability depends on an embedding application exposing attacker influence over one of these public argument paths:\n\n- the leading item of `nltk.internals.java(cmd=...)`; or\n- `StanfordSegmenter(java_class=...)` or an equivalent wrapper-controlled command token.\n\nThe attacker must also be able to reference an argument file or JAR readable by the NLTK process. The Java child process executes with the privileges of that process.\n\nThis is not a claim that importing NLTK alone is remotely exploitable. The confirmed issue is that the default protected execution boundary can be bypassed when these argument channels are exposed to untrusted input.\n\n## Impact\n\nSuccessful exploitation allows execution of attacker-selected Java bytecode with the privileges of the process using NLTK.\n\nSuggested classifications:\n\n- CWE-88: Improper Neutralization of Argument Delimiters in a Command\n- CWE-94: Improper Control of Generation of Code\n\nSuggested severity: Moderate, subject to maintainer assessment of realistic argument reachability in embedding applications.\n\n## Reproduction\n\nThe complete reproducer, machine-readable proof results, and proposed remediation are included in the attached evidence package.\n\n[nltk-3103-candidate-a-maintainer-evidence.zip](https://github.com/user-attachments/files/31124796/nltk-3103-candidate-a-maintainer-evidence.zip)\n\n\nThe included `reproducer/reproduce_cmd_channel_bypass.py` creates only temporary researcher-controlled Java source, JAR, argument-file, and marker artifacts. It performs no network access.\n\nRequirements:\n\n- Python 3.10 or newer\n- `nltk==3.10.3`\n- a JDK providing `java`, `javac`, and `jar`\n\nRun:\n\n```bash\npython reproducer/reproduce_cmd_channel_bypass.py\n```\n\nA confirmed run exits with status 0 and reports that:\n\n- the `options` channel blocks `@argfile`;\n- the direct `cmd` channel executes the external JAR 3/3;\n- the higher-level `StanfordSegmenter.java_class` channel executes it 3/3; and\n- legitimate trusted main-class execution remains functional.\n\n## Recommended remediation\n\nEnforce that the first ordinary `cmd` item is a Java main-class token. Reject Java launcher switches and `@argfile` references in this channel by default, before constructing or executing the subprocess command.\n\nFor example:\n\n```python\ncmd_list = list(cmd)\nif not cmd_list:\n raise ValueError(\"cmd must contain a Java main class\")\nfirst = cmd_list[0]\nif not isinstance(first, str) or not first or first.startswith((\"-\", \"@\")):\n raise ValueError(\"cmd must begin with a Java main class\")\n```\n\nIf raw Java launcher modes are intentionally supported, they should require a clearly named explicit trusted escape hatch rather than sharing the normal main-class channel.\n\nThe attachment includes a proposed source patch and focused regression tests. Local verification against code derived from the official 3.10.3 wheel showed:\n\n```text\ndirect -jar command channel BLOCKED\nStanfordSegmenter @argfile path BLOCKED\nexternal marker creation BLOCKED\nlegitimate trusted main class PRESERVED\n```\n\n## Relationship to existing advisory / duplicate note\n\nThe public advisory GHSA-m4rf-3fr8-xwx3 describes the per-call `options` validation gap fixed in 3.10.3. This report is intentionally scoped as an additional bypass of that remediation through the distinct `cmd`/`java_class` argument channel.\n\nI did not locate a public advisory, issue, or pull request describing this leading-`cmd` launcher-token path. I cannot determine whether an equivalent private report already exists, so please deduplicate this report against any private reports or unpublished follow-up work.\n\nPlease keep this report and attachment private while assessing and preparing any fix. I am available to test a candidate patch and adapt the regression tests to the project\u0027s preferred style.\n\n\n## Fix status (2026-09-28)\n\nStatus: MERGED on develop (unreleased; v3.10.3 of 2026-08-12 predates the fix).\n\nPR: #3771 \"Reject Java launcher switches and @argfiles in the java() cmd argument (CWE-88)\", merged 2026-08-20, merge commit 45a08fded on develop. Fix commit: b36212795 (java() raises ValueError when the first cmd token is a launcher switch or an @argfile, and when any cmd token is an @argfile; StanfordSegmenter passes its java_class as that first token, nltk/tokenize/stanford_segmenter.py line 432, so both reported paths hit the same check).\n\nProbe: none. Reproduction on develop 2fa3f48fe with the process spawn intercepted: cmd=[\"-jar\", jar], cmd=[\"@argfile\"] and cmd=[\"Main\", \"@argfile\"] each raise ValueError (CWE-88) before any spawn.\n\nRelease: none yet; no release tag contains b36212795.",
"id": "GHSA-x8q7-6c7m-52gw",
"modified": "2026-11-19T23:55:54Z",
"published": "2026-11-19T23:55:54Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/nltk/nltk/security/advisories/GHSA-x8q7-6c7m-52gw"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-128138"
},
{
"type": "WEB",
"url": "https://github.com/nltk/nltk/pull/3771"
},
{
"type": "WEB",
"url": "https://github.com/nltk/nltk/commit/b36212795a522d2b7b176cf0e0d9d8da489ba6e6"
},
{
"type": "PACKAGE",
"url": "https://github.com/nltk/nltk"
},
{
"type": "WEB",
"url": "https://github.com/nltk/nltk/releases/tag/v3.10.4"
}
],
"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": "NLTK incomplete fix: additional JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command arguments"
}
GHSA-X8QQ-H47G-QX3J
Vulnerability from github – Published: 2023-08-04 00:30 – Updated: 2024-04-04 06:33django-sspanel v2022.2.2 was discovered to contain a remote command execution (RCE) vulnerability via the component sspanel/admin_view.py -> GoodsCreateView._post.
{
"affected": [],
"aliases": [
"CVE-2023-38941"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-08-04T00:15:13Z",
"severity": "CRITICAL"
},
"details": "django-sspanel v2022.2.2 was discovered to contain a remote command execution (RCE) vulnerability via the component sspanel/admin_view.py -\u003e GoodsCreateView._post.",
"id": "GHSA-x8qq-h47g-qx3j",
"modified": "2024-04-04T06:33:28Z",
"published": "2023-08-04T00:30:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-38941"
},
{
"type": "WEB",
"url": "https://github.com/Ehco1996/django-sspanel"
}
],
"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-X8VC-M4H5-5G2G
Vulnerability from github – Published: 2022-09-16 00:00 – Updated: 2022-09-21 00:00TOTOLINK-720R v4.1.5cu.374 was discovered to contain a remote code execution (RCE) vulnerability via the setTracerouteCfg function.
{
"affected": [],
"aliases": [
"CVE-2022-38535"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-09-15T18:15:00Z",
"severity": "HIGH"
},
"details": "TOTOLINK-720R v4.1.5cu.374 was discovered to contain a remote code execution (RCE) vulnerability via the setTracerouteCfg function.",
"id": "GHSA-x8vc-m4h5-5g2g",
"modified": "2022-09-21T00:00:52Z",
"published": "2022-09-16T00:00:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-38535"
},
{
"type": "WEB",
"url": "https://github.com/Jfox816/TOTOLINK-720R/blob/177ee39a5a8557a6bd19586731b0e624548b67ee/totolink%20720%20RCode%20Execution2.md"
}
],
"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"
}
]
}
GHSA-X8VM-V82F-5F3C
Vulnerability from github – Published: 2025-02-12 15:32 – Updated: 2026-05-08 21:31In Progress® Telerik® UI for WinUI versions prior to 2025 Q1 (3.0.0), a command injection attack is possible through improper neutralization of hyperlink elements.
{
"affected": [],
"aliases": [
"CVE-2024-12251"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-02-12T15:15:12Z",
"severity": "HIGH"
},
"details": "In Progress\u00ae Telerik\u00ae UI for WinUI versions prior to 2025 Q1 (3.0.0), a command injection attack is possible through improper neutralization of hyperlink elements.",
"id": "GHSA-x8vm-v82f-5f3c",
"modified": "2026-05-08T21:31:18Z",
"published": "2025-02-12T15:32:02Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-12251"
},
{
"type": "WEB",
"url": "https://docs.telerik.com/devtools/winui/security/kb-security-command-injection-cve-2024-12251"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X8X5-9GF5-CJXG
Vulnerability from github – Published: 2022-05-24 17:45 – Updated: 2022-05-24 17:45Certain NETGEAR devices are affected by command injection by an authenticated user. This affects RBK852 before 3.2.17.12, RBK853 before 3.2.17.12, RBK854 before 3.2.17.12, RBR850 before 3.2.17.12, and RBS850 before 3.2.17.12.
{
"affected": [],
"aliases": [
"CVE-2021-29070"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-03-23T07:15:00Z",
"severity": "HIGH"
},
"details": "Certain NETGEAR devices are affected by command injection by an authenticated user. This affects RBK852 before 3.2.17.12, RBK853 before 3.2.17.12, RBK854 before 3.2.17.12, RBR850 before 3.2.17.12, and RBS850 before 3.2.17.12.",
"id": "GHSA-x8x5-9gf5-cjxg",
"modified": "2022-05-24T17:45:07Z",
"published": "2022-05-24T17:45:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-29070"
},
{
"type": "WEB",
"url": "https://kb.netgear.com/000063019/Security-Advisory-for-Post-Authentication-Command-Injection-on-Some-WiFi-Routers-PSV-2020-0530"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-X8XP-278J-CQH4
Vulnerability from github – Published: 2021-12-27 00:00 – Updated: 2022-01-08 00:00Certain NETGEAR devices are affected by command injection by an unauthenticated attacker. This affects CBR40 before 2.5.0.24, CBR750 before 4.6.3.6, EAX20 before 1.0.0.58, EAX80 before 1.0.1.68, LAX20 before 1.1.6.28, MR60 before 1.0.6.116, MR80 before 1.1.2.20, MS60 before 1.0.6.116, MS80 before 1.1.2.20, MK62 before 1.0.6.116, MK83 before 1.1.2.20, R6400 before 1.0.1.70, R6400v2 before 1.0.4.106, R6700v3 before 1.0.4.106, R6900P before 1.3.3.140, R7000 before 1.0.11.126, R7000P before 1.3.3.140, R7850 before 1.0.5.74, R7900 before 1.0.4.46, R7900P before 1.4.2.84, R7960P before 1.4.2.84, R8000 before 1.0.4.74, R8000P before 1.4.2.84, RAX15 before 1.0.3.96, RAX20 before 1.0.3.96, RAX200 before 1.0.4.120, RAX35v2 before 1.0.3.96, RAX40v2 before 1.0.3.96, RAX43 before 1.0.3.96, RAX45 before 1.0.3.96, RAX50 before 1.0.3.96, RAX75 before 1.0.4.120, RAX80 before 1.0.4.120, RBK752 before 3.2.17.12, RBK852 before 3.2.17.12, RBR750 before 3.2.17.12, RBR850 before 3.2.17.12, RBS750 before 3.2.17.12, RBS850 before 3.2.17.12, RS400 before 1.5.1.80, XR1000 before 1.0.0.58, and XR300 before 1.0.3.68.
{
"affected": [],
"aliases": [
"CVE-2021-45620"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-12-26T01:15:00Z",
"severity": "CRITICAL"
},
"details": "Certain NETGEAR devices are affected by command injection by an unauthenticated attacker. This affects CBR40 before 2.5.0.24, CBR750 before 4.6.3.6, EAX20 before 1.0.0.58, EAX80 before 1.0.1.68, LAX20 before 1.1.6.28, MR60 before 1.0.6.116, MR80 before 1.1.2.20, MS60 before 1.0.6.116, MS80 before 1.1.2.20, MK62 before 1.0.6.116, MK83 before 1.1.2.20, R6400 before 1.0.1.70, R6400v2 before 1.0.4.106, R6700v3 before 1.0.4.106, R6900P before 1.3.3.140, R7000 before 1.0.11.126, R7000P before 1.3.3.140, R7850 before 1.0.5.74, R7900 before 1.0.4.46, R7900P before 1.4.2.84, R7960P before 1.4.2.84, R8000 before 1.0.4.74, R8000P before 1.4.2.84, RAX15 before 1.0.3.96, RAX20 before 1.0.3.96, RAX200 before 1.0.4.120, RAX35v2 before 1.0.3.96, RAX40v2 before 1.0.3.96, RAX43 before 1.0.3.96, RAX45 before 1.0.3.96, RAX50 before 1.0.3.96, RAX75 before 1.0.4.120, RAX80 before 1.0.4.120, RBK752 before 3.2.17.12, RBK852 before 3.2.17.12, RBR750 before 3.2.17.12, RBR850 before 3.2.17.12, RBS750 before 3.2.17.12, RBS850 before 3.2.17.12, RS400 before 1.5.1.80, XR1000 before 1.0.0.58, and XR300 before 1.0.3.68.",
"id": "GHSA-x8xp-278j-cqh4",
"modified": "2022-01-08T00:00:55Z",
"published": "2021-12-27T00:00:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45620"
},
{
"type": "WEB",
"url": "https://kb.netgear.com/000064510/Security-Advisory-for-Pre-Authentication-Command-Injection-on-Some-Routers-Extenders-and-WiFi-Systems-PSV-2020-0509"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-X94J-5JM6-C7R7
Vulnerability from github – Published: 2022-08-26 00:03 – Updated: 2022-08-27 00:00TOTOLINK A7000R V9.1.0u.6115_B20201022 was discovered to contain a command injection vulnerability via the host_time parameter at the function NTPSyncWithHost.
{
"affected": [],
"aliases": [
"CVE-2022-37082"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-08-25T15:15:00Z",
"severity": "HIGH"
},
"details": "TOTOLINK A7000R V9.1.0u.6115_B20201022 was discovered to contain a command injection vulnerability via the host_time parameter at the function NTPSyncWithHost.",
"id": "GHSA-x94j-5jm6-c7r7",
"modified": "2022-08-27T00:00:46Z",
"published": "2022-08-26T00:03:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-37082"
},
{
"type": "WEB",
"url": "https://github.com/Darry-lang1/vuln/tree/main/TOTOLINK/A7000R/3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X964-JVP7-FJ3V
Vulnerability from github – Published: 2022-02-09 00:00 – Updated: 2022-03-17 00:05D-Link device DI-7200GV2.E1 v21.04.09E1 was discovered to contain a command injection vulnerability in the function version_upgrade.asp. This vulnerability allows attackers to execute arbitrary commands via the path parameter.
{
"affected": [],
"aliases": [
"CVE-2021-46232"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-02-04T02:15:00Z",
"severity": "CRITICAL"
},
"details": "D-Link device DI-7200GV2.E1 v21.04.09E1 was discovered to contain a command injection vulnerability in the function version_upgrade.asp. This vulnerability allows attackers to execute arbitrary commands via the path parameter.",
"id": "GHSA-x964-jvp7-fj3v",
"modified": "2022-03-17T00:05:59Z",
"published": "2022-02-09T00:00:41Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-46232"
},
{
"type": "WEB",
"url": "https://github.com/pjqwudi/my_vuln/blob/main/D-link/vuln_8/8.md"
},
{
"type": "WEB",
"url": "https://supportannouncement.us.dlink.com/announcement/publication.aspx?name=SAP10284"
},
{
"type": "WEB",
"url": "https://www.dlink.com/en/security-bulletin"
}
],
"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
If at all possible, use library calls rather than external processes to recreate the desired functionality.
Mitigation
If possible, ensure that all external commands called from the program are statically created.
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.
Mitigation
Run time: Run time policy enforcement may be used in an allowlist fashion to prevent use of any non-sanctioned commands.
Mitigation
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.