CWE-94
Allowed-with-ReviewImproper Control of Generation of Code ('Code Injection')
Abstraction: Base · Status: Draft
The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
9394 vulnerabilities reference this CWE, most recent first.
GHSA-MC3J-R9QR-6VGV
Vulnerability from github – Published: 2022-03-02 00:00 – Updated: 2022-03-17 00:04Pluxml v5.8.7 was discovered to allow attackers to execute arbitrary code via crafted PHP code inserted into static pages.
{
"affected": [],
"aliases": [
"CVE-2022-25018"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-03-01T02:15:00Z",
"severity": "HIGH"
},
"details": "Pluxml v5.8.7 was discovered to allow attackers to execute arbitrary code via crafted PHP code inserted into static pages.",
"id": "GHSA-mc3j-r9qr-6vgv",
"modified": "2022-03-17T00:04:32Z",
"published": "2022-03-02T00:00:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-25018"
},
{
"type": "WEB",
"url": "https://github.com/MoritzHuppert/CVE-2022-25018/blob/main/CVE-2022-25018.pdf"
},
{
"type": "WEB",
"url": "https://github.com/pluxml/PluXml"
},
{
"type": "WEB",
"url": "https://youtu.be/Gbe2UNCB0tY"
},
{
"type": "WEB",
"url": "http://pluxml.com"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-MC3V-59X4-8R59
Vulnerability from github – Published: 2022-05-01 06:58 – Updated: 2022-05-01 06:58Unspecified vulnerability in Microsoft Office 2003 SP1 and SP2, Office XP SP3, Office 2000 SP3, and other products, allows user-assisted attackers to execute arbitrary code via an Office file with a malformed property that triggers memory corruption related to record lengths, aka "Microsoft Office Property Vulnerability," a different vulnerability than CVE-2006-1316.
{
"affected": [],
"aliases": [
"CVE-2006-2389"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-07-11T21:05:00Z",
"severity": "HIGH"
},
"details": "Unspecified vulnerability in Microsoft Office 2003 SP1 and SP2, Office XP SP3, Office 2000 SP3, and other products, allows user-assisted attackers to execute arbitrary code via an Office file with a malformed property that triggers memory corruption related to record lengths, aka \"Microsoft Office Property Vulnerability,\" a different vulnerability than CVE-2006-1316.",
"id": "GHSA-mc3v-59x4-8r59",
"modified": "2022-05-01T06:58:43Z",
"published": "2022-05-01T06:58:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-2389"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2006/ms06-038"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/27609"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A279"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/21012"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1016469"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/409316"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/27149"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/18911"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA06-192A.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/2756"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-MC47-CJ3J-GP86
Vulnerability from github – Published: 2022-05-01 18:26 – Updated: 2022-05-01 18:26PHP remote file inclusion vulnerability in environment.php in AnyInventory 1.9.1 and 2.0, when register_globals is enabled, allows remote attackers to execute arbitrary PHP code via a URL in the DIR_PREFIX parameter.
{
"affected": [],
"aliases": [
"CVE-2007-4744"
],
"database_specific": {
"cwe_ids": [
"CWE-20",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-09-06T22:17:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in environment.php in AnyInventory 1.9.1 and 2.0, when register_globals is enabled, allows remote attackers to execute arbitrary PHP code via a URL in the DIR_PREFIX parameter.",
"id": "GHSA-mc47-cj3j-gp86",
"modified": "2022-05-01T18:26:35Z",
"published": "2022-05-01T18:26:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-4744"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/36436"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4365"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/26696"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/36846"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/25550"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-MC52-MWQ4-VFX3
Vulnerability from github – Published: 2026-10-06 18:58 – Updated: 2026-10-06 18:58Overview
A critical Arbitrary Code Execution (ACE) vulnerability exists in the Knowns Language Server Protocol (LSP) detection and startup pipeline. The system blindly trusts the settings.lsp.languages.<lang>.binary field defined in the project-level .knowns/config.json file.
Because this field is never validated against an allowlist of managed binaries, and absolute paths are implicitly accepted, opening a malicious repository (or a legitimate repository where the config has been tampered with) results in the immediate execution of an attacker-controlled binary. The payload is executed twice per session: once during the initial runVersionCheck (health check), and again when the LSP server process is spawned via Server.Start(). When chained with the previously identified Config Overwrite vulnerabilities, this flaw yields a fully unauthenticated Remote Code Execution chain.
Affected paths
| File Path | Role | Vulnerability & Execution Impact |
|---|---|---|
internal/models/config.go |
Validation Gap | Missing Binary Validation (CWE-829): ProjectSettings.Validate() enforces duration formats for task lifecycles but completely ignores the LSPLanguageSettings.Binary field. Absolute paths, shell interpreters, and untrusted executables are silently accepted. |
internal/lsp/detect.go |
Execution Sink #1 | Unsanitized Health Check Execution: Detector.resolve() passes the unvalidated override to exec.LookPath(), then invokes runVersionCheck() which blindly calls cmd.Run() on the attacker-controlled binary with CheckArgs. |
internal/lsp/server.go |
Execution Sink #2 | Unsanitized LSP Server Spawn: Server.Start() passes the resolved binary path to knownsprocess.Command() and spawns it as a long-running background process via cmd.Start(), executing the payload a second time. |
Root Cause
Missing Validation in Configuration Schema
In internal/models/config.go, the ProjectSettings.Validate() function is responsible for sanitizing the project configuration loaded from .knowns/config.json. However, it only validates task lifecycle durations:
func (s ProjectSettings) Validate() error {
settings := s.EffectiveTaskLifecycle()
if _, err := ParseTaskLifecycleDuration(settings.ArchiveAfter); err != nil { ... }
// NO VALIDATION FOR s.LSP.Languages[lang].Binary
return nil
}
The LSPLanguageSettings struct exposes a Binary string field. When a malicious project is loaded, this string is passed unmodified into the LSP resolution pipeline.
Blind Execution in LSP Detector
In internal/lsp/detect.go, the Detector.resolve() function accepts an override string (from the config) and forces it into the execution pipeline:
func (d *Detector) resolve(ctx context.Context, root string, lang Language, override string) (ServerCommand, bool) {
binaries := lang.Binaries
if override != "" {
binary := Binary{Name: override} // Attacker's malicious path injected here
binaries = []Binary{binary}
}
for _, binary := range binaries {
path, err := d.LookPath(binary.Name) // Accepts absolute paths (e.g., /tmp/evil.sh)
// ...
err = d.RunCheck(checkCtx, path, binary.CheckArgs...) // EXECUTION #1
// ...
}
}
d.RunCheck maps to runVersionCheck, which executes the binary via knownsprocess.CommandContext(ctx, path, args...).Run().
Unrestricted Process Spawn
In internal/lsp/server.go, when the LSP manager starts the server, it executes the same compromised path:
func (s *Server) Start(ctx context.Context) error {
// ...
cmd := knownsprocess.Command(s.Command.Path, s.Command.Args...) // EXECUTION #2
cmd.Dir = s.Root
// ...
if err := cmd.Start(); err != nil { ... }
}
Attack Vector
| Phase | Request / Action | Effect |
|---|---|---|
| 1. Plant | Attacker commits .knowns/config.json containing {"settings":{"lsp":{"languages":{"go":{"binary":"/tmp/evil.sh"}}}}} to a repository. |
Malicious config embedded in the project. |
| 2. Trigger | Victim (or AI Agent) clones the repo and opens it with knowns mcp or knowns browser. |
Auto-detection scans the project, finds a .go file, and loads the malicious config. |
| 3. Execute (Health Check) | Detector.resolve() calls runVersionCheck("/tmp/evil.sh", "version"). |
RCE Execution #1 occurs silently in the background. |
| 4. Execute (LSP Spawn) | Server.Start() calls cmd.Start() with the same binary. |
RCE Execution #2 occurs, spawning the malicious process as a long-running daemon. |
Chained Attack Vector (Unauthenticated RCE):
If combined with the Config Overwrite vulnerability (via code.replace path traversal), a remote attacker can overwrite .knowns/config.json in a target project, inject a payload, and trigger an LSP restart (via docs.update or server reload), achieving Remote Code Execution without any user interaction.
Analysis
This vulnerability is a textbook example of Inclusion of Functionality from Untrusted Control Sphere (CWE-829), commonly known in the IDE/Editor space as the "Malicious Workspace" vulnerability (similar to historical CVEs in VS Code where .vscode/settings.json could point to malicious interpreter paths).
The core failure is the lack of a strict allowlist for executable paths. By relying on exec.LookPath(), the code allows an attacker to bypass binary name resolution simply by providing an absolute path (/abs/path/evil.sh) or a path containing a slash (./evil.sh).
Furthermore, the execution happens automatically upon project load. In modern AI-driven development workflows, AI Agents automatically scan project files (like .go, .ts, .py) to provide context. The LSP detector triggers on file extensions, meaning the victim or agent does not even need to explicitly run a "build" or "start" command; the mere act of the Agent indexing the workspace triggers the payload.
Fix
Patch is available right now at New Release.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.29.1"
},
"package": {
"ecosystem": "npm",
"name": "knowns"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.30.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-86540"
],
"database_specific": {
"cwe_ids": [
"CWE-427",
"CWE-78",
"CWE-829",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-06T18:58:38Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Overview\n\nA critical **Arbitrary Code Execution (ACE)** vulnerability exists in the Knowns Language Server Protocol (LSP) detection and startup pipeline. The system blindly trusts the `settings.lsp.languages.\u003clang\u003e.binary` field defined in the project-level `.knowns/config.json` file. \n\nBecause this field is **never validated** against an allowlist of managed binaries, and absolute paths are implicitly accepted, opening a malicious repository (or a legitimate repository where the config has been tampered with) results in the immediate execution of an attacker-controlled binary. The payload is executed **twice** per session: once during the initial `runVersionCheck` (health check), and again when the LSP server process is spawned via `Server.Start()`. When chained with the previously identified Config Overwrite vulnerabilities, this flaw yields a fully unauthenticated Remote Code Execution chain.\n\n## Affected paths\n\n| File Path | Role | Vulnerability \u0026 Execution Impact |\n| :--- | :--- | :--- |\n| **`internal/models/config.go`** | Validation Gap | **Missing Binary Validation (CWE-829):** `ProjectSettings.Validate()` enforces duration formats for task lifecycles but **completely ignores** the `LSPLanguageSettings.Binary` field. Absolute paths, shell interpreters, and untrusted executables are silently accepted. |\n| **`internal/lsp/detect.go`** | Execution Sink #1 | **Unsanitized Health Check Execution:** `Detector.resolve()` passes the unvalidated override to `exec.LookPath()`, then invokes `runVersionCheck()` which blindly calls `cmd.Run()` on the attacker-controlled binary with `CheckArgs`. |\n| **`internal/lsp/server.go`** | Execution Sink #2 | **Unsanitized LSP Server Spawn:** `Server.Start()` passes the resolved binary path to `knownsprocess.Command()` and spawns it as a long-running background process via `cmd.Start()`, executing the payload a second time. |\n\n## Root Cause\n\n### Missing Validation in Configuration Schema\nIn `internal/models/config.go`, the `ProjectSettings.Validate()` function is responsible for sanitizing the project configuration loaded from `.knowns/config.json`. However, it only validates task lifecycle durations:\n\n```go\nfunc (s ProjectSettings) Validate() error {\n settings := s.EffectiveTaskLifecycle()\n if _, err := ParseTaskLifecycleDuration(settings.ArchiveAfter); err != nil { ... }\n // NO VALIDATION FOR s.LSP.Languages[lang].Binary\n return nil\n}\n```\n\nThe `LSPLanguageSettings` struct exposes a `Binary` string field. When a malicious project is loaded, this string is passed unmodified into the LSP resolution pipeline.\n\n### Blind Execution in LSP Detector\nIn `internal/lsp/detect.go`, the `Detector.resolve()` function accepts an `override` string (from the config) and forces it into the execution pipeline:\n\n```go\nfunc (d *Detector) resolve(ctx context.Context, root string, lang Language, override string) (ServerCommand, bool) {\n binaries := lang.Binaries\n if override != \"\" {\n binary := Binary{Name: override} // Attacker\u0027s malicious path injected here\n binaries = []Binary{binary}\n }\n for _, binary := range binaries {\n path, err := d.LookPath(binary.Name) // Accepts absolute paths (e.g., /tmp/evil.sh)\n // ...\n err = d.RunCheck(checkCtx, path, binary.CheckArgs...) // EXECUTION #1\n // ...\n }\n}\n```\n\n`d.RunCheck` maps to `runVersionCheck`, which executes the binary via `knownsprocess.CommandContext(ctx, path, args...).Run()`.\n\n### Unrestricted Process Spawn\nIn `internal/lsp/server.go`, when the LSP manager starts the server, it executes the same compromised path:\n\n```go\nfunc (s *Server) Start(ctx context.Context) error {\n // ...\n cmd := knownsprocess.Command(s.Command.Path, s.Command.Args...) // EXECUTION #2\n cmd.Dir = s.Root\n // ...\n if err := cmd.Start(); err != nil { ... }\n}\n```\n\n## Attack Vector\n\n| Phase | Request / Action | Effect |\n| :--- | :--- | :--- |\n| **1. Plant** | Attacker commits `.knowns/config.json` containing `{\"settings\":{\"lsp\":{\"languages\":{\"go\":{\"binary\":\"/tmp/evil.sh\"}}}}}` to a repository. | Malicious config embedded in the project. |\n| **2. Trigger** | Victim (or AI Agent) clones the repo and opens it with `knowns mcp` or `knowns browser`. | Auto-detection scans the project, finds a `.go` file, and loads the malicious config. |\n| **3. Execute (Health Check)** | `Detector.resolve()` calls `runVersionCheck(\"/tmp/evil.sh\", \"version\")`. | **RCE Execution #1** occurs silently in the background. |\n| **4. Execute (LSP Spawn)** | `Server.Start()` calls `cmd.Start()` with the same binary. | **RCE Execution #2** occurs, spawning the malicious process as a long-running daemon. |\n\n**Chained Attack Vector (Unauthenticated RCE):**\nIf combined with the **Config Overwrite** vulnerability (via `code.replace` path traversal), a remote attacker can overwrite `.knowns/config.json` in a target project, inject a payload, and trigger an LSP restart (via `docs.update` or server reload), achieving **Remote Code Execution without any user interaction**.\n\n## Analysis\n\nThis vulnerability is a textbook example of **Inclusion of Functionality from Untrusted Control Sphere (CWE-829)**, commonly known in the IDE/Editor space as the \"Malicious Workspace\" vulnerability (similar to historical CVEs in VS Code where `.vscode/settings.json` could point to malicious interpreter paths).\n\nThe core failure is the lack of a strict allowlist for executable paths. By relying on `exec.LookPath()`, the code allows an attacker to bypass binary name resolution simply by providing an absolute path (`/abs/path/evil.sh`) or a path containing a slash (`./evil.sh`). \n\nFurthermore, the execution happens **automatically** upon project load. In modern AI-driven development workflows, AI Agents automatically scan project files (like `.go`, `.ts`, `.py`) to provide context. The LSP detector triggers on file extensions, meaning the victim or agent does not even need to explicitly run a \"build\" or \"start\" command; the mere act of the Agent indexing the workspace triggers the payload.\n\n## Fix\n\n*Patch is available right now at [New Release](https://github.com/knowns-dev/knowns/releases).*",
"id": "GHSA-mc52-mwq4-vfx3",
"modified": "2026-10-06T18:58:38Z",
"published": "2026-10-06T18:58:38Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/knowns-dev/knowns/security/advisories/GHSA-mc52-mwq4-vfx3"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-86540"
},
{
"type": "WEB",
"url": "https://github.com/knowns-dev/knowns/commit/d3989829fb5095666d23d005b2f78a082832a396"
},
{
"type": "PACKAGE",
"url": "https://github.com/knowns-dev/knowns"
},
{
"type": "WEB",
"url": "https://github.com/knowns-dev/knowns/blob/v0.29.1/internal/lsp/detect.go#L128-L157"
},
{
"type": "WEB",
"url": "https://github.com/knowns-dev/knowns/blob/v0.29.1/internal/models/config.go#L205-L216"
},
{
"type": "WEB",
"url": "https://github.com/knowns-dev/knowns/releases/tag/v0.30.0"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/knowns-before-0.30.0-arbitrary-code-execution-via-lsp-binary"
}
],
"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"
}
],
"summary": "knowns OS Command Injection via Insecure LSP Binary Path Config in .knowns/config.json"
}
GHSA-MC64-V3MW-VQ6W
Vulnerability from github – Published: 2022-05-14 02:18 – Updated: 2022-05-14 02:18Adobe Reader and Acrobat 9.x before 9.4, and 8.x before 8.2.5 on Windows and Mac OS X, allow attackers to execute arbitrary code via unspecified vectors, related to a "prefix protocol handler vulnerability."
{
"affected": [],
"aliases": [
"CVE-2010-3625"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-10-06T17:00:00Z",
"severity": "HIGH"
},
"details": "Adobe Reader and Acrobat 9.x before 9.4, and 8.x before 8.2.5 on Windows and Mac OS X, allow attackers to execute arbitrary code via unspecified vectors, related to a \"prefix protocol handler vulnerability.\"",
"id": "GHSA-mc64-v3mw-vq6w",
"modified": "2022-05-14T02:18:01Z",
"published": "2022-05-14T02:18:01Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-3625"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6772"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2010-10/msg00001.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2010-10/msg00006.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/43025"
},
{
"type": "WEB",
"url": "http://security.gentoo.org/glsa/glsa-201101-08.xml"
},
{
"type": "WEB",
"url": "http://www.adobe.com/support/security/bulletins/apsb10-21.html"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2010-0743.html"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA10-279A.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2011/0191"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-MC79-8XP6-RCW8
Vulnerability from github – Published: 2025-12-15 18:30 – Updated: 2025-12-16 21:30An SSTI (Server-Side Template Injection) vulnerability exists in the get_terms_and_conditions method of Frappe ERPNext through 15.89.0. The function renders attacker-controlled Jinja2 templates (terms) using frappe.render_template() with a user-supplied context (doc). Although Frappe uses a custom SandboxedEnvironment, several dangerous globals such as frappe.db.sql are still available in the execution context via get_safe_globals(). An authenticated attacker with access to create or modify a Terms and Conditions document can inject arbitrary Jinja expressions into the terms field, resulting in server-side code execution within a restricted but still unsafe context. This vulnerability can be used to leak database information.
{
"affected": [],
"aliases": [
"CVE-2025-66436"
],
"database_specific": {
"cwe_ids": [
"CWE-1336",
"CWE-918",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-15T18:15:48Z",
"severity": "MODERATE"
},
"details": "An SSTI (Server-Side Template Injection) vulnerability exists in the get_terms_and_conditions method of Frappe ERPNext through 15.89.0. The function renders attacker-controlled Jinja2 templates (terms) using frappe.render_template() with a user-supplied context (doc). Although Frappe uses a custom SandboxedEnvironment, several dangerous globals such as frappe.db.sql are still available in the execution context via get_safe_globals(). An authenticated attacker with access to create or modify a Terms and Conditions document can inject arbitrary Jinja expressions into the terms field, resulting in server-side code execution within a restricted but still unsafe context. This vulnerability can be used to leak database information.",
"id": "GHSA-mc79-8xp6-rcw8",
"modified": "2025-12-16T21:30:52Z",
"published": "2025-12-15T18:30:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-66436"
},
{
"type": "WEB",
"url": "https://iamanc.github.io/post/erpnext-ssti-bug-3"
},
{
"type": "WEB",
"url": "https://www.notion.so/SSTI-bug-3-239e6086eadc8020aeecdaf123e32f3d?source=copy_link"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-MC7R-7RQG-F4VP
Vulnerability from github – Published: 2022-05-17 05:36 – Updated: 2025-04-11 03:52PHP remote file inclusion vulnerability in nucleus/plugins/NP_gallery.php in the NP_Gallery plugin 0.94 for Nucleus allows remote attackers to execute arbitrary PHP code via a URL in the DIR_NUCLEUS parameter. NOTE: some of these details are obtained from third party information.
{
"affected": [],
"aliases": [
"CVE-2010-5040"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2011-11-02T21:55:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in nucleus/plugins/NP_gallery.php in the NP_Gallery plugin 0.94 for Nucleus allows remote attackers to execute arbitrary PHP code via a URL in the DIR_NUCLEUS parameter. NOTE: some of these details are obtained from third party information.",
"id": "GHSA-mc7r-7rqg-f4vp",
"modified": "2025-04-11T03:52:39Z",
"published": "2022-05-17T05:36:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-5040"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/40022"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/12787"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/65004"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/40448"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/1285"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-MC9C-24HR-W33V
Vulnerability from github – Published: 2022-05-01 23:58 – Updated: 2022-05-01 23:58PHP remote file inclusion vulnerability in config.php in Adam Scheinberg Flip 3.0 allows remote attackers to execute arbitrary PHP code via a URL in the incpath parameter.
{
"affected": [],
"aliases": [
"CVE-2008-3311"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-07-25T16:41:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in config.php in Adam Scheinberg Flip 3.0 allows remote attackers to execute arbitrary PHP code via a URL in the incpath parameter.",
"id": "GHSA-mc9c-24hr-w33v",
"modified": "2022-05-01T23:58:52Z",
"published": "2022-05-01T23:58:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-3311"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43943"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/4040"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/494585/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/30312"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-MCCR-H554-3WJW
Vulnerability from github – Published: 2022-05-17 01:39 – Updated: 2022-05-17 01:39Format string vulnerability in the print_proxies function in bin/proxy.c in libproxy 0.3.1 might allow context-dependent attackers to cause a denial of service (crash) and possibly execute arbitrary code via format string specifiers in a proxy name, as demonstrated using the http_proxy environment variable or a PAC file.
{
"affected": [],
"aliases": [
"CVE-2012-5580"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-10-27T22:55:00Z",
"severity": "HIGH"
},
"details": "Format string vulnerability in the print_proxies function in bin/proxy.c in libproxy 0.3.1 might allow context-dependent attackers to cause a denial of service (crash) and possibly execute arbitrary code via format string specifiers in a proxy name, as demonstrated using the http_proxy environment variable or a PAC file.",
"id": "GHSA-mccr-h554-3wjw",
"modified": "2022-05-17T01:39:20Z",
"published": "2022-05-17T01:39:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-5580"
},
{
"type": "WEB",
"url": "https://bugzilla.novell.com/show_bug.cgi?id=791086"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=883100"
},
{
"type": "WEB",
"url": "https://code.google.com/p/libproxy/source/detail?r=475"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/80340"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/56712"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-MCFM-CXWV-VQ32
Vulnerability from github – Published: 2024-04-04 09:30 – Updated: 2024-08-28 21:31An issue was discovered in SeaCMS version 12.9, allows remote attackers to execute arbitrary code via admin notify.php.
{
"affected": [],
"aliases": [
"CVE-2024-30565"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-04-04T08:15:07Z",
"severity": "HIGH"
},
"details": "An issue was discovered in SeaCMS version 12.9, allows remote attackers to execute arbitrary code via admin notify.php.",
"id": "GHSA-mcfm-cxwv-vq32",
"modified": "2024-08-28T21:31:27Z",
"published": "2024-04-04T09:30:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-30565"
},
{
"type": "WEB",
"url": "https://github.com/XiLitter/CMS_vulnerability-discovery/blob/main/SeaCMS_v.12.9.md"
}
],
"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"
}
]
}
Mitigation
Strategy: Refactoring
Refactor your program so that you do not have to dynamically generate code.
Mitigation
- Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which code can be executed by your product.
- Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection.
- This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise.
- Be careful to avoid CWE-243 and other weaknesses related to jails.
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.
- To reduce the likelihood of code injection, use stringent allowlists that limit which constructs are allowed. If you are dynamically constructing code that invokes a function, then verifying that the input is alphanumeric might be insufficient. An attacker might still be able to reference a dangerous function that you did not intend to allow, such as system(), exec(), or exit().
Mitigation
Use dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.
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
For Python programs, it is frequently encouraged to use the ast.literal_eval() function instead of eval, since it is intentionally designed to avoid executing code. However, an adversary could still cause excessive memory or stack consumption via deeply nested structures [REF-1372], so the python documentation discourages use of ast.literal_eval() on untrusted data [REF-1373].
CAPEC-242: Code Injection
An adversary exploits a weakness in input validation on the target to inject new code into that which is currently executing. This differs from code inclusion in that code inclusion involves the addition or replacement of a reference to a code file, which is subsequently loaded by the target and used as part of the code of some application.
CAPEC-35: Leverage Executable Code in Non-Executable Files
An attack of this type exploits a system's trust in configuration and resource files. When the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high.
CAPEC-77: Manipulating User-Controlled Variables
This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An adversary can override variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the adversary can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.