CWE-749
AllowedExposed Dangerous Method or Function
Abstraction: Base · Status: Incomplete
The product provides an Applications Programming Interface (API) or similar interface for interaction with external actors, but the interface includes a dangerous method or function that is not properly restricted.
397 vulnerabilities reference this CWE, most recent first.
GHSA-X9RP-7WH3-2RJ5
Vulnerability from github – Published: 2026-11-03 17:48 – Updated: 2026-11-03 17:48Summary
Elo's programmatic AST API accepts arbitrary values in many node fields without runtime type or syntax validation. Each backend's emit stage interpolates those values straight into the generated source with no escape pass. An integrator that populates the AST from JSON-deserialised input, plugin output, or any other untyped source therefore exposes a code-injection primitive that flows through to the emitted JavaScript, Ruby, Python, or SQL.
The same pattern was previously addressed in 0.9.7 (2026-01-27), which patched the date/datetime/duration literal emitters via JSON.stringify() after a report by naoyashiga. This advisory generalises that fix to the remaining AST surface — at least 23 emission sites across six node-field categories and four backends.
Vulnerable sinks
Each row is a category of sinks that share the same shape: TypeScript signature erased at runtime → AST-API consumer passes a crafted value → emit interpolates the value verbatim.
| # | AST field | Affected backends | Resulting injection |
|---|---|---|---|
| 1 | int_literal / float_literal .value |
JS, Ruby, Python, SQL | Arbitrary expression in the emitted numeric position (RCE on JS/Ruby/Python; SQL expression injection) |
| 2 | variable.name |
JS, Ruby, Python, SQL | Identifier-position injection; on SQL, raw SQL injection because undefined identifiers are intentionally emitted as column references |
| 3 | member_access.property |
JS, Ruby, Python, SQL | Property access escaped into expression (RCE) |
| 4 | object_literal key |
JS, Ruby, SQL | Computed-key / extra-property injection (RCE on JS/Ruby; SQL injection) |
| 5 | datapath segment |
JS, Ruby, Python, SQL | Ruby symbol-list injection allows backtick shell exec; SQL string-segment unquoted in single-quote context allows SQL injection |
| 6 | lambda.params[].name |
JS, Ruby, Python | Parameter-list structural injection (RCE) |
| 7 | SQL let binding name |
SQL | Identifier injection in … AS <name> clause |
Proof of Concept
End-to-end execution was verified at commit 749af7b for representative cases per backend. Examples:
Numeric literal injection (all four backends). Feeding the following AST through compileToJavaScript emits a live console.log on call:
{ type: 'literal', value: "(console.log('PWN_INT_JS'),1)" }
// emits: (function(_) { return (console.log('PWN_INT_JS'),1); })(null);
The same AST against Ruby with "(system('touch /tmp/pwn_int_ruby'); 1)" creates the file; Python with "(print('PWN_INT_PY') or 1)" prints the sentinel; SQL emits the raw string into the numeric position.
SQL variable.name injection:
{ type: 'variable', name: "1; DROP TABLE users; --" }
// emits: 1; DROP TABLE users; --
Ruby datapath segment shell-exec:
{ type: 'datapath', segments: ["a, system(`touch /tmp/pwn_dp_ruby`)"] }
// emits: [:a, system(`touch /tmp/pwn_dp_ruby`)]
All ten end-to-end cases are automated in the ast-exec.js / ast-exec2.js scripts attached to the original report; each console.log and sentinel file was observed.
Independence from GHSA #2
This finding is independent of GHSA #2 (the .constructor.constructor sandbox escape). That report covers payloads delivered as plain Elo strings through the parser; the present advisory covers payloads delivered as AST objects through the programmatic API. The two threat models do not overlap: GHSA #2's identifier regex ^[a-zA-Z_][a-zA-Z0-9_]*$ accepts constructor (and is the right behaviour for a parser), while the present advisory adds runtime validation at every backend emit site so that AST-API consumers cannot inject arbitrary text into emitted source.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.0.0"
},
"package": {
"ecosystem": "npm",
"name": "@enspirit/elo"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.0.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-44265"
],
"database_specific": {
"cwe_ids": [
"CWE-20",
"CWE-749",
"CWE-89",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-03T17:48:09Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Summary\n\nElo\u0027s programmatic AST API accepts arbitrary values in many node fields without runtime type or syntax validation. Each backend\u0027s emit stage interpolates those values straight into the generated source with no escape pass. An integrator that populates the AST from JSON-deserialised input, plugin output, or any other untyped source therefore exposes a code-injection primitive that flows through to the emitted JavaScript, Ruby, Python, or SQL.\n\nThe same pattern was previously addressed in **0.9.7 (2026-01-27)**, which patched the date/datetime/duration literal emitters via `JSON.stringify()` after a report by **naoyashiga**. This advisory generalises that fix to the remaining AST surface \u2014 at least 23 emission sites across six node-field categories and four backends.\n\n### Vulnerable sinks\n\nEach row is a category of sinks that share the same shape: TypeScript signature erased at runtime \u2192 AST-API consumer passes a crafted value \u2192 emit interpolates the value verbatim.\n\n| # | AST field | Affected backends | Resulting injection |\n|---|---|---|---|\n| 1 | `int_literal` / `float_literal` `.value` | JS, Ruby, Python, SQL | Arbitrary expression in the emitted numeric position (RCE on JS/Ruby/Python; SQL expression injection) |\n| 2 | `variable.name` | JS, Ruby, Python, SQL | Identifier-position injection; on SQL, raw SQL injection because undefined identifiers are intentionally emitted as column references |\n| 3 | `member_access.property` | JS, Ruby, Python, SQL | Property access escaped into expression (RCE) |\n| 4 | `object_literal` key | JS, Ruby, SQL | Computed-key / extra-property injection (RCE on JS/Ruby; SQL injection) |\n| 5 | `datapath` segment | JS, Ruby, Python, SQL | Ruby symbol-list injection allows backtick shell exec; SQL string-segment unquoted in single-quote context allows SQL injection |\n| 6 | `lambda.params[].name` | JS, Ruby, Python | Parameter-list structural injection (RCE) |\n| 7 | SQL `let` binding `name` | SQL | Identifier injection in `\u2026 AS \u003cname\u003e` clause |\n\n### Proof of Concept\n\nEnd-to-end execution was verified at commit `749af7b` for representative cases per backend. Examples:\n\n**Numeric literal injection (all four backends).** Feeding the following AST through `compileToJavaScript` emits a live `console.log` on call:\n\n```js\n{ type: \u0027literal\u0027, value: \"(console.log(\u0027PWN_INT_JS\u0027),1)\" }\n// emits: (function(_) { return (console.log(\u0027PWN_INT_JS\u0027),1); })(null);\n```\n\nThe same AST against Ruby with `\"(system(\u0027touch /tmp/pwn_int_ruby\u0027); 1)\"` creates the file; Python with `\"(print(\u0027PWN_INT_PY\u0027) or 1)\"` prints the sentinel; SQL emits the raw string into the numeric position.\n\n**SQL `variable.name` injection:**\n\n```js\n{ type: \u0027variable\u0027, name: \"1; DROP TABLE users; --\" }\n// emits: 1; DROP TABLE users; --\n```\n\n**Ruby `datapath` segment shell-exec:**\n\n```js\n{ type: \u0027datapath\u0027, segments: [\"a, system(`touch /tmp/pwn_dp_ruby`)\"] }\n// emits: [:a, system(`touch /tmp/pwn_dp_ruby`)]\n```\n\nAll ten end-to-end cases are automated in the `ast-exec.js` / `ast-exec2.js` scripts attached to the original report; each `console.log` and sentinel file was observed.\n\n### Independence from GHSA #2\n\nThis finding is independent of **GHSA #2** (the `.constructor.constructor` sandbox escape). That report covers payloads delivered as plain Elo *strings* through the parser; the present advisory covers payloads delivered as AST *objects* through the programmatic API. The two threat models do not overlap: GHSA #2\u0027s identifier regex `^[a-zA-Z_][a-zA-Z0-9_]*$` accepts `constructor` (and is the right behaviour for a parser), while the present advisory adds runtime validation at every backend emit site so that AST-API consumers cannot inject arbitrary text into emitted source.",
"id": "GHSA-x9rp-7wh3-2rj5",
"modified": "2026-11-03T17:48:09Z",
"published": "2026-11-03T17:48:09Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/enspirit/elo/security/advisories/GHSA-x9rp-7wh3-2rj5"
},
{
"type": "WEB",
"url": "https://github.com/enspirit/elo/commit/d2a89a8db76a244eb740687524a7e8529b7554b5"
},
{
"type": "WEB",
"url": "https://github.com/enspirit/elo/commit/fb57dd37a2669d9c412454225c5b89a2adba5d93"
},
{
"type": "PACKAGE",
"url": "https://github.com/enspirit/elo"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Elo backends have code injection via unvalidated emission of programmatic AST fields"
}
GHSA-XFP5-23MR-JWJM
Vulnerability from github – Published: 2025-07-17 21:32 – Updated: 2025-07-17 21:32GoldenDict 1.5.0 and 1.5.1 has an exposed dangerous method that allows reading and modifying files when a user adds a crafted dictionary and then searches for any term included in that dictionary.
{
"affected": [],
"aliases": [
"CVE-2025-53964"
],
"database_specific": {
"cwe_ids": [
"CWE-749"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-17T20:15:30Z",
"severity": "CRITICAL"
},
"details": "GoldenDict 1.5.0 and 1.5.1 has an exposed dangerous method that allows reading and modifying files when a user adds a crafted dictionary and then searches for any term included in that dictionary.",
"id": "GHSA-xfp5-23mr-jwjm",
"modified": "2025-07-17T21:32:16Z",
"published": "2025-07-17T21:32:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-53964"
},
{
"type": "WEB",
"url": "https://github.com/goldendict/goldendict/releases"
},
{
"type": "WEB",
"url": "https://github.com/tigr78/CVE-2025-53964"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-XGQ5-8XJQ-968V
Vulnerability from github – Published: 2025-07-01 15:31 – Updated: 2025-07-01 15:31A vulnerability in HPE Insight Remote Support (IRS) prior to v7.15.0.646 may allow an unauthenticated denial of service
{
"affected": [],
"aliases": [
"CVE-2025-37097"
],
"database_specific": {
"cwe_ids": [
"CWE-749"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-01T14:15:38Z",
"severity": "HIGH"
},
"details": "A vulnerability in HPE Insight Remote Support (IRS) prior to v7.15.0.646 may allow an unauthenticated denial of service",
"id": "GHSA-xgq5-8xjq-968v",
"modified": "2025-07-01T15:31:09Z",
"published": "2025-07-01T15:31:09Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-37097"
},
{
"type": "WEB",
"url": "https://support.hpe.com/hpesc/public/docDisplay?docId=hpesbgn04878en_us\u0026docLocale=en_US"
},
{
"type": "WEB",
"url": "https://www.tenable.com/security/research/tra-2025-15"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XP84-J34W-W78H
Vulnerability from github – Published: 2026-11-10 18:31 – Updated: 2026-11-10 18:31An exposed dangerous function in Ivanti EPMM before version 12.11.0.0, 12.10.0.1, and 12.9.0.3 allows a local authenticated attacker to trigger a denial of service.
{
"affected": [],
"aliases": [
"CVE-2026-107405"
],
"database_specific": {
"cwe_ids": [
"CWE-749"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-10T17:17:19Z",
"severity": "MODERATE"
},
"details": "An exposed dangerous function in Ivanti EPMM before version 12.11.0.0, 12.10.0.1, and 12.9.0.3 allows a local authenticated attacker to trigger a denial of service.",
"id": "GHSA-xp84-j34w-w78h",
"modified": "2026-11-10T18:31:44Z",
"published": "2026-11-10T18:31:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-107405"
},
{
"type": "WEB",
"url": "https://hub.ivanti.com/s/article/November-2026-Security-Advisory-Ivanti-EPMM-Multiple-CVEs"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XV6G-6G23-79W2
Vulnerability from github – Published: 2023-03-29 21:30 – Updated: 2023-04-06 15:30This vulnerability allows remote attackers to bypass authentication on affected installations of Ivanti Avalanche 6.3.3.101. Authentication is not required to exploit this vulnerability. The specific flaw exists within the SetSettings class. The issue results from the lack of authentication prior to allowing access to functionality. An attacker can leverage this vulnerability to bypass authentication on the system. Was ZDI-CAN-15919.
{
"affected": [],
"aliases": [
"CVE-2022-36983"
],
"database_specific": {
"cwe_ids": [
"CWE-306",
"CWE-749"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-03-29T19:15:00Z",
"severity": "CRITICAL"
},
"details": "This vulnerability allows remote attackers to bypass authentication on affected installations of Ivanti Avalanche 6.3.3.101. Authentication is not required to exploit this vulnerability. The specific flaw exists within the SetSettings class. The issue results from the lack of authentication prior to allowing access to functionality. An attacker can leverage this vulnerability to bypass authentication on the system. Was ZDI-CAN-15919.",
"id": "GHSA-xv6g-6g23-79w2",
"modified": "2023-04-06T15:30:18Z",
"published": "2023-03-29T21:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-36983"
},
{
"type": "WEB",
"url": "https://download.wavelink.com/Files/avalanche_v6.3.4_release_notes.txt"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-22-788"
}
],
"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-XV95-6CCG-FMWJ
Vulnerability from github – Published: 2026-09-08 18:31 – Updated: 2026-09-08 18:31A vulnerability in the Unified Extensible Firmware Interface (UEFI) Shell implementation of Cisco UCS Servers and UCS-based appliances could allow an authenticated attacker with valid credentials for a user account with the role of user or admin or an unauthenticated attacker with physical access to an affected device to bypass UEFI Secure Boot validation checks and execute unauthorized software.
This vulnerability is due to the availability of memory write commands in the UEFI Shell while UEFI Secure Boot is enabled on a device. An attacker could exploit this vulnerability by selecting the UEFI Shell boot option at boot time and using available shell commands to modify UEFI memory variables. A successful exploit could allow the attacker to manipulate the preboot environment, overwrite UEFI Secure Boot-related memory values, and execute unauthorized software on the affected device.
{
"affected": [],
"aliases": [
"CVE-2026-20293"
],
"database_specific": {
"cwe_ids": [
"CWE-749"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-08T17:17:34Z",
"severity": "HIGH"
},
"details": "A vulnerability in the Unified Extensible Firmware Interface (UEFI) Shell implementation of Cisco UCS Servers and UCS-based appliances could allow an authenticated attacker with valid credentials for a user account with the role of user or admin\u0026nbsp;or an unauthenticated attacker with physical access to an affected device to bypass UEFI Secure Boot validation checks and execute unauthorized software.\n\nThis vulnerability is due to the availability of memory write commands in the UEFI Shell while UEFI Secure Boot is enabled on a device. An attacker could exploit this vulnerability by selecting the UEFI Shell boot option at boot time and using available shell commands to modify UEFI memory variables. A successful exploit could allow the attacker to manipulate the preboot environment, overwrite UEFI Secure Boot-related memory values, and execute unauthorized software on the affected device.",
"id": "GHSA-xv95-6ccg-fmwj",
"modified": "2026-09-08T18:31:55Z",
"published": "2026-09-08T18:31:55Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-20293"
},
{
"type": "WEB",
"url": "https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-ucs-uefi-sb-bypass-eb6xC5GW"
}
],
"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:N",
"type": "CVSS_V3"
}
]
}
GHSA-XVPW-PP3C-GX2X
Vulnerability from github – Published: 2025-12-24 00:30 – Updated: 2025-12-24 00:30RealDefense SUPERAntiSpyware Exposed Dangerous Function Local Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of RealDefense SUPERAntiSpyware. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.
The specific flaw exists within the SAS Core Service. The issue results from an exposed dangerous function. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of SYSTEM. Was ZDI-CAN-27677.
{
"affected": [],
"aliases": [
"CVE-2025-14495"
],
"database_specific": {
"cwe_ids": [
"CWE-749"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-23T22:15:50Z",
"severity": "HIGH"
},
"details": "RealDefense SUPERAntiSpyware Exposed Dangerous Function Local Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of RealDefense SUPERAntiSpyware. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.\n\nThe specific flaw exists within the SAS Core Service. The issue results from an exposed dangerous function. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of SYSTEM. Was ZDI-CAN-27677.",
"id": "GHSA-xvpw-pp3c-gx2x",
"modified": "2025-12-24T00:30:16Z",
"published": "2025-12-24T00:30:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-14495"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-25-1169"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
If you must expose a method, make sure to perform input validation on all arguments, limit access to authorized parties, and protect against all possible vulnerabilities.
Mitigation
Strategy: Attack Surface Reduction
- Identify all exposed functionality. Explicitly list all functionality that must be exposed to some user or set of users. Identify which functionality may be:
- Ensure that the implemented code follows these expectations. This includes setting the appropriate access modifiers where applicable (public, private, protected, etc.) or not marking ActiveX controls safe-for-scripting.
- accessible to all users
- restricted to a small set of privileged users
- prevented from being directly accessible at all
CAPEC-500: WebView Injection
An adversary, through a previously installed malicious application, injects code into the context of a web page displayed by a WebView component. Through the injected code, an adversary is able to manipulate the DOM tree and cookies of the page, expose sensitive information, and can launch attacks against the web application from within the web page.