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.
8467 vulnerabilities reference this CWE, most recent first.
GHSA-3566-JFM7-38PH
Vulnerability from github – Published: 2022-05-02 03:42 – Updated: 2022-05-02 03:42PHP remote file inclusion vulnerability in save.php in phpSANE 0.5.0 allows remote attackers to execute arbitrary PHP code via a URL in the file_save parameter.
{
"affected": [],
"aliases": [
"CVE-2009-3188"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-09-15T21:30:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in save.php in phpSANE 0.5.0 allows remote attackers to execute arbitrary PHP code via a URL in the file_save parameter.",
"id": "GHSA-3566-jfm7-38ph",
"modified": "2022-05-02T03:42:35Z",
"published": "2022-05-02T03:42:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-3188"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36476"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/9533"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/2436"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-356V-396G-55J7
Vulnerability from github – Published: 2022-05-17 00:58 – Updated: 2022-05-17 00:58The web console in Mozilla Firefox before 15.0, Firefox ESR 10.x before 10.0.7, Thunderbird before 15.0, and Thunderbird ESR 10.x before 10.0.7 allows user-assisted remote attackers to execute arbitrary JavaScript code with chrome privileges via a crafted web site that injects this code and triggers an eval operation.
{
"affected": [],
"aliases": [
"CVE-2012-3980"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-08-29T10:56:00Z",
"severity": "HIGH"
},
"details": "The web console in Mozilla Firefox before 15.0, Firefox ESR 10.x before 10.0.7, Thunderbird before 15.0, and Thunderbird ESR 10.x before 10.0.7 allows user-assisted remote attackers to execute arbitrary JavaScript code with chrome privileges via a crafted web site that injects this code and triggers an eval operation.",
"id": "GHSA-356v-396g-55j7",
"modified": "2022-05-17T00:58:07Z",
"published": "2022-05-17T00:58:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-3980"
},
{
"type": "WEB",
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=771859"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A17000"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2012-08/msg00028.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2012-09/msg00011.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2012-09/msg00014.html"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2012-1210.html"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2012-1211.html"
},
{
"type": "WEB",
"url": "http://www.mozilla.org/security/announce/2012/mfsa2012-72.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/55257"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-1548-1"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-1548-2"
},
{
"type": "WEB",
"url": "http://www.xerox.com/download/security/security-bulletin/16287-4d6b7b0c81f7b/cert_XRX13-003_v1.0.pdf"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-358Q-4XQQ-GG73
Vulnerability from github – Published: 2022-05-02 03:46 – Updated: 2022-05-02 03:46PHP remote file inclusion vulnerability in CoupleDB.php in PHPGenealogy 2.0 allows remote attackers to execute arbitrary PHP code via a URL in the DataDirectory parameter.
{
"affected": [],
"aliases": [
"CVE-2009-3541"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-10-02T19:30:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in CoupleDB.php in PHPGenealogy 2.0 allows remote attackers to execute arbitrary PHP code via a URL in the DataDirectory parameter.",
"id": "GHSA-358q-4xqq-gg73",
"modified": "2022-05-02T03:46:04Z",
"published": "2022-05-02T03:46:04Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-3541"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/51728"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/9155"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-359Q-VFG7-7CHR
Vulnerability from github – Published: 2022-05-14 02:41 – Updated: 2022-05-14 02:41Electron Inc. Advanced Electron Forum before 1.0.7 allows remote attackers to execute arbitrary PHP code via PHP code embedded in bbcode in the email parameter, which is processed by the preg_replace function with the eval switch.
{
"affected": [],
"aliases": [
"CVE-2008-5090"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-11-14T19:20:00Z",
"severity": "HIGH"
},
"details": "Electron Inc. Advanced Electron Forum before 1.0.7 allows remote attackers to execute arbitrary PHP code via PHP code embedded in bbcode in the email parameter, which is processed by the preg_replace function with the eval switch.",
"id": "GHSA-359q-vfg7-7chr",
"modified": "2022-05-14T02:41:00Z",
"published": "2022-05-14T02:41:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-5090"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/45270"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/6499"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/31978"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/4598"
},
{
"type": "WEB",
"url": "http://www.anelectron.com/board/index.php?tid=3282"
},
{
"type": "WEB",
"url": "http://www.gulftech.org/?node=research\u0026article_id=00131-09202008"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/496552/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/31268"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-35HX-486G-2HPC
Vulnerability from github – Published: 2022-05-24 16:51 – Updated: 2024-04-04 01:25An issue was discovered in Bitdefender products for Windows (Bitdefender Endpoint Security Tool versions prior to 6.6.8.115; and Bitdefender Antivirus Plus, Bitdefender Internet Security, and Bitdefender Total Security versions prior to 23.0.24.120) that can lead to local code injection. A local attacker with administrator privileges can create a malicious DLL file in %SystemRoot%\System32\ that will be executed with local user privileges.
{
"affected": [],
"aliases": [
"CVE-2019-14242"
],
"database_specific": {
"cwe_ids": [
"CWE-427",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-07-30T18:15:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in Bitdefender products for Windows (Bitdefender Endpoint Security Tool versions prior to 6.6.8.115; and Bitdefender Antivirus Plus, Bitdefender Internet Security, and Bitdefender Total Security versions prior to 23.0.24.120) that can lead to local code injection. A local attacker with administrator privileges can create a malicious DLL file in %SystemRoot%\\System32\\ that will be executed with local user privileges.",
"id": "GHSA-35hx-486g-2hpc",
"modified": "2024-04-04T01:25:06Z",
"published": "2022-05-24T16:51:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-14242"
},
{
"type": "WEB",
"url": "https://www.bitdefender.com/support/security-advisories/code-injection-bitdefender-products-windows"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-35JH-R3H4-6JHM
Vulnerability from github – Published: 2021-05-06 16:05 – Updated: 2025-08-12 21:44lodash versions prior to 4.17.21 are vulnerable to Command Injection via the template function.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "lodash"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.17.21"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "lodash-es"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.17.21"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "lodash.template"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "4.5.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "lodash-template"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.0.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "RubyGems",
"name": "lodash-rails"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.17.21"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-23337"
],
"database_specific": {
"cwe_ids": [
"CWE-77",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2021-03-31T23:59:26Z",
"nvd_published_at": "2021-02-15T13:15:00Z",
"severity": "HIGH"
},
"details": "`lodash` versions prior to 4.17.21 are vulnerable to Command Injection via the template function.",
"id": "GHSA-35jh-r3h4-6jhm",
"modified": "2025-08-12T21:44:24Z",
"published": "2021-05-06T16:05:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-23337"
},
{
"type": "WEB",
"url": "https://github.com/lodash/lodash/commit/3469357cff396a26c363f8c1b5a91dde28ba4b1c"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cpuoct2021.html"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cpujul2022.html"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cpujan2022.html"
},
{
"type": "WEB",
"url": "https://www.oracle.com//security-alerts/cpujul2021.html"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-LODASH-1040724"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1074929"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBLODASH-1074931"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1074928"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-1074930"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JAVA-ORGFUJIONWEBJARS-1074932"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20210312-0006"
},
{
"type": "WEB",
"url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/lodash-rails/CVE-2021-23337.yml"
},
{
"type": "WEB",
"url": "https://github.com/lodash/lodash/blob/ddfd9b11a0126db2302cb70ec9973b66baec0975/lodash.js#L14851"
},
{
"type": "PACKAGE",
"url": "https://github.com/lodash/lodash"
},
{
"type": "WEB",
"url": "https://cert-portal.siemens.com/productcert/pdf/ssa-637483.pdf"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Command Injection in lodash"
}
GHSA-35JP-8CGG-P4WJ
Vulnerability from github – Published: 2024-08-08 14:50 – Updated: 2024-08-08 17:00Impact
The context variable is injected into almost any Twig Template and allows to access to current language, currency information. The context object allows also to switch for a short time the scope of the Context as a helper with a callable function.
Example call from PHP:
$context->scope(Context::SYSTEM_SCOPE, static function (Context $context) use ($mediaService, $media, &$fileBlob): void {
$fileBlob = $mediaService->loadFile($media->getId(), $context);
});
This function can be called also from Twig and as the second parameter allows any callable, it's possible to call from Twig any statically callable PHP function/method.
It's not possible as customer to provide any Twig code, the attacker would require access to Administration to exploit it using Mail templates or using App Scripts.
Patches
Update to Shopware 6.6.5.1 or 6.5.8.13
Workarounds
For older versions of 6.1, 6.2, 6.3 and 6.4 corresponding security measures are also available via a plugin. For the full range of functions, we recommend updating to the latest Shopware version.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 6.5.8.12"
},
"package": {
"ecosystem": "Packagist",
"name": "shopware/core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "6.5.8.13"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 6.5.8.12"
},
"package": {
"ecosystem": "Packagist",
"name": "shopware/platform"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "6.5.8.13"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 6.6.5.0"
},
"package": {
"ecosystem": "Packagist",
"name": "shopware/platform"
},
"ranges": [
{
"events": [
{
"introduced": "6.6.0.0"
},
{
"fixed": "6.6.5.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 6.6.5.0"
},
"package": {
"ecosystem": "Packagist",
"name": "shopware/core"
},
"ranges": [
{
"events": [
{
"introduced": "6.6.0.0"
},
{
"fixed": "6.6.5.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-42356"
],
"database_specific": {
"cwe_ids": [
"CWE-1336",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-08-08T14:50:11Z",
"nvd_published_at": "2024-08-08T15:15:18Z",
"severity": "HIGH"
},
"details": "### Impact\nThe `context` variable is injected into almost any Twig Template and allows to access to current language, currency information. The context object allows also to switch for a short time the scope of the Context as a helper with a callable function. \n\nExample call from PHP:\n\n```php\n$context-\u003escope(Context::SYSTEM_SCOPE, static function (Context $context) use ($mediaService, $media, \u0026$fileBlob): void {\n $fileBlob = $mediaService-\u003eloadFile($media-\u003egetId(), $context);\n});\n```\n\nThis function can be called also from Twig and as the second parameter allows any callable, it\u0027s possible to call from Twig any statically callable PHP function/method.\n\nIt\u0027s not possible as customer to provide any Twig code, the attacker would require access to Administration to exploit it using Mail templates or using App Scripts.\n\n### Patches\nUpdate to Shopware 6.6.5.1 or 6.5.8.13\n\n### Workarounds\nFor older versions of 6.1, 6.2, 6.3 and 6.4 corresponding security measures are also available via a plugin. For the full range of functions, we recommend updating to the latest Shopware version.\n",
"id": "GHSA-35jp-8cgg-p4wj",
"modified": "2024-08-08T17:00:22Z",
"published": "2024-08-08T14:50:11Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/shopware/shopware/security/advisories/GHSA-35jp-8cgg-p4wj"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-42356"
},
{
"type": "WEB",
"url": "https://github.com/shopware/core/commit/04183e0c02af3b404eb7d52c683734bfe0595038"
},
{
"type": "WEB",
"url": "https://github.com/shopware/core/commit/a784aa1cec0624e36e0ee4d41aeebaed40e0442f"
},
{
"type": "WEB",
"url": "https://github.com/shopware/shopware/commit/8504ba7e56e53add6a1d5b9d45015e3d899cd0ac"
},
{
"type": "WEB",
"url": "https://github.com/shopware/shopware/commit/e43423bcc93c618c3036f94c12aa29514da8cf2e"
},
{
"type": "PACKAGE",
"url": "https://github.com/shopware/shopware"
}
],
"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:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Shopware vulnerable to Server Side Template Injection in Twig using Context functions"
}
GHSA-35P8-RGFH-RPW2
Vulnerability from github – Published: 2023-02-22 06:30 – Updated: 2025-03-13 21:30hour_of_code_python_2015 commit 520929797b9ca43bb818b2e8f963fb2025459fa3 was discovered to contain a code execution backdoor via the request package (requirements.txt). This vulnerability allows attackers to access sensitive user information and execute arbitrary code.
{
"affected": [],
"aliases": [
"CVE-2023-24107"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-02-22T04:15:00Z",
"severity": "CRITICAL"
},
"details": "hour_of_code_python_2015 commit 520929797b9ca43bb818b2e8f963fb2025459fa3 was discovered to contain a code execution backdoor via the request package (requirements.txt). This vulnerability allows attackers to access sensitive user information and execute arbitrary code.",
"id": "GHSA-35p8-rgfh-rpw2",
"modified": "2025-03-13T21:30:57Z",
"published": "2023-02-22T06:30:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-24107"
},
{
"type": "WEB",
"url": "https://github.com/jminh/hour_of_code_python_2015/issues/4"
},
{
"type": "WEB",
"url": "https://github.com/jminh/hour_of_code_python_2015"
},
{
"type": "WEB",
"url": "https://mirrors.neusoft.edu.cn/pypi/web/simple/request"
}
],
"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-35XM-QVJG-8M42
Vulnerability from github – Published: 2026-04-01 22:19 – Updated: 2026-04-06 17:25Summary
A stored XSS vulnerability exists in DbGate because attacker-controlled SVG icon strings are rendered as raw HTML without sanitization. In the web UI this allows script execution in another user's browser; in the Electron desktop app this can escalate to local code execution because Electron is configured with nodeIntegration: true and contextIsolation: false.
Details
The issue is in the icon rendering path:
packages/web/src/icons/FontIcon.svelte- treats any icon string starting with
<svgas inline SVG - renders it with
{@html iconValue}without sanitization packages/api/src/controllers/apps.js- loads app definitions from disk and returns
applicationIconto clients unchanged packages/web/src/appobj/DatabaseAppObject.svelte- passes
applicationIconintoadditionalIcons packages/web/src/appobj/AppObjectCore.svelte- renders those icons through
<FontIcon icon={ic.icon}>
This makes applicationIcon a stored XSS sink.
An attacker who can create or modify an app definition can store a payload in applicationIcon. When another user views a matching database/app entry, the payload executes in that user's session.
The impact is especially severe in Electron desktop because:
app/src/electron.jsnodeIntegration: truecontextIsolation: false
With that configuration, JavaScript gained through XSS can access Node/Electron APIs, making local code execution possible.
PoC
This was reproduced by creating an app definition with a malicious applicationIcon and making it match a visible database.
Example payload:
{
"applicationName": "XSS PoC",
"applicationIcon": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\"><circle cx=\"9\" cy=\"9\" r=\"8\" fill=\"red\"/></svg><img src=x onerror=\"alert('xss-fired')\">",
"usageRules": [
{
"serverHostsList": ["postgres"],
"databaseNamesList": ["dbgate"]
}
]
}
After saving this app definition and opening the UI where the matching database/app icon is rendered, the JavaScript executes.
RCE In Electron app:
1. Prepare an attacker-controlled application JSON file with a malicious applicationIcon value.
2. Set usageRules so the application matches a database the victim is likely to view.
3. Example payload:
{
"applicationName": "XSS PoC",
"applicationIcon": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\"><circle cx=\"9\" cy=\"9\" r=\"8\" fill=\"red\"/></svg><img src=x onerror=\"require('fs').writeFileSync(require('path').join(process.cwd(),'xss-rce-poc.txt'),'poc')\">",
"usageRules": [
{
"serverHostsRegex": ".*",
"databaseNamesRegex": ".*"
}
]
}
- Deliver this JSON file to the victim as an application definition file.
- The victim imports or saves the file into DbGate's apps storage, for example by opening/creating an application file and saving the attacker-controlled JSON content.
- DbGate later loads that app definition through apps/get-all-apps.
- When the victim opens a UI view that renders the matching database/application icon, the applicationIcon value is passed into FontIcon.
- FontIcon detects that the string starts with <svg and renders it via raw {@html}.
- The injected HTML executes in the Electron renderer process.
- Because DbGate Desktop uses nodeIntegration: true and contextIsolation: false, the payload can access Node APIs and write the marker file xss-rce-poc.txt
This demonstrates that a malicious saved application JSON file can become stored XSS in the UI and escalate to local code execution in Electron.
Impact
Web app If an attacker can place a malicious application definition where another user will load it, arbitrary JavaScript executes in the victim's browser session. This can lead to token theft, session hijacking, and performing privileged actions as the victim inside DbGate.
Electron desktop app
In the desktop app, the impact is more severe because the Electron renderer is configured with nodeIntegration: true and contextIsolation: false. If a victim imports or saves a malicious application definition and later opens a UI view that renders the icon, the XSS can access Node/Electron APIs and may result in local code execution on the victim machine.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "dbgate-web"
},
"ranges": [
{
"events": [
{
"introduced": "7.0.0"
},
{
"fixed": "7.1.5"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-34725"
],
"database_specific": {
"cwe_ids": [
"CWE-79",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-01T22:19:57Z",
"nvd_published_at": "2026-04-02T18:16:33Z",
"severity": "HIGH"
},
"details": "### Summary\nA stored XSS vulnerability exists in DbGate because attacker-controlled SVG icon strings are rendered as raw HTML without sanitization. In the web UI this allows script execution in another user\u0027s browser; in the Electron desktop app this can escalate to local code execution because Electron is configured with `nodeIntegration: true` and `contextIsolation: false`.\n\n### Details\nThe issue is in the icon rendering path:\n\n- `packages/web/src/icons/FontIcon.svelte`\n - treats any icon string starting with `\u003csvg` as inline SVG\n - renders it with `{@html iconValue}` without sanitization\n- `packages/api/src/controllers/apps.js`\n - loads app definitions from disk and returns `applicationIcon` to clients unchanged\n- `packages/web/src/appobj/DatabaseAppObject.svelte`\n - passes `applicationIcon` into `additionalIcons`\n- `packages/web/src/appobj/AppObjectCore.svelte`\n - renders those icons through `\u003cFontIcon icon={ic.icon}\u003e`\n\nThis makes `applicationIcon` a stored XSS sink.\n\nAn attacker who can create or modify an app definition can store a payload in `applicationIcon`. When another user views a matching database/app entry, the payload executes in that user\u0027s session.\n\nThe impact is especially severe in Electron desktop because:\n\n- `app/src/electron.js`\n - `nodeIntegration: true`\n - `contextIsolation: false`\n\nWith that configuration, JavaScript gained through XSS can access Node/Electron APIs, making local code execution possible.\n\n\n### PoC\nThis was reproduced by creating an app definition with a malicious `applicationIcon` and making it match a visible database.\n\nExample payload:\n\n```json\n{\n \"applicationName\": \"XSS PoC\",\n \"applicationIcon\": \"\u003csvg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"18\\\" height=\\\"18\\\"\u003e\u003ccircle cx=\\\"9\\\" cy=\\\"9\\\" r=\\\"8\\\" fill=\\\"red\\\"/\u003e\u003c/svg\u003e\u003cimg src=x onerror=\\\"alert(\u0027xss-fired\u0027)\\\"\u003e\",\n \"usageRules\": [\n {\n \"serverHostsList\": [\"postgres\"],\n \"databaseNamesList\": [\"dbgate\"]\n }\n ]\n}\n```\n\nAfter saving this app definition and opening the UI where the matching database/app icon is rendered, the JavaScript executes.\n\nRCE In Electron app: \n1. Prepare an attacker-controlled application JSON file with a malicious `applicationIcon` value.\n2. Set `usageRules` so the application matches a database the victim is likely to view.\n3. Example payload:\n\n```json\n{\n \"applicationName\": \"XSS PoC\",\n \"applicationIcon\": \"\u003csvg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"18\\\" height=\\\"18\\\"\u003e\u003ccircle cx=\\\"9\\\" cy=\\\"9\\\" r=\\\"8\\\" fill=\\\"red\\\"/\u003e\u003c/svg\u003e\u003cimg src=x onerror=\\\"require(\u0027fs\u0027).writeFileSync(require(\u0027path\u0027).join(process.cwd(),\u0027xss-rce-poc.txt\u0027),\u0027poc\u0027)\\\"\u003e\",\n \"usageRules\": [\n {\n \"serverHostsRegex\": \".*\",\n \"databaseNamesRegex\": \".*\"\n }\n ]\n}\n```\n\n4. Deliver this JSON file to the victim as an application definition file.\n5. The victim imports or saves the file into DbGate\u0027s apps storage, for example by opening/creating an application file and saving the attacker-controlled JSON content.\n6. DbGate later loads that app definition through apps/get-all-apps.\n7. When the victim opens a UI view that renders the matching database/application icon, the applicationIcon value is passed into FontIcon.\n8. FontIcon detects that the string starts with \u003csvg and renders it via raw {@html}.\n9. The injected HTML executes in the Electron renderer process.\n10. Because DbGate Desktop uses nodeIntegration: true and contextIsolation: false, the payload can access Node APIs and write the marker file xss-rce-poc.txt\n\nThis demonstrates that a malicious saved application JSON file can become stored XSS in the UI and escalate to local code execution in Electron.\n\n### Impact\n**Web app**\nIf an attacker can place a malicious application definition where another user will load it, arbitrary JavaScript executes in the victim\u0027s browser session. This can lead to token theft, session hijacking, and performing privileged actions as the victim inside DbGate.\n\n**Electron desktop app**\nIn the desktop app, the impact is more severe because the Electron renderer is configured with `nodeIntegration: true` and `contextIsolation: false`. If a victim imports or saves a malicious application definition and later opens a UI view that renders the icon, the XSS can access Node/Electron APIs and may result in local code execution on the victim machine.",
"id": "GHSA-35xm-qvjg-8m42",
"modified": "2026-04-06T17:25:15Z",
"published": "2026-04-01T22:19:57Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/dbgate/dbgate/security/advisories/GHSA-35xm-qvjg-8m42"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34725"
},
{
"type": "WEB",
"url": "https://github.com/dbgate/dbgate/commit/a7d2ed11f3f3d4dfb5d2e4e5467dedafa5fa947e"
},
{
"type": "PACKAGE",
"url": "https://github.com/dbgate/dbgate"
},
{
"type": "WEB",
"url": "https://github.com/dbgate/dbgate/releases/tag/v7.1.5"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "dbgate-web: Stored XSS in applicationIcon leads to potential RCE in Electron due to unsafe renderer configuration"
}
GHSA-35XX-9XRG-GWHF
Vulnerability from github – Published: 2026-05-04 18:30 – Updated: 2026-05-08 17:46Description:
Improper Control of Generation of Code ('Code Injection') vulnerability in Apache Atlas.
Apache Atlas exposes a DSL search endpoint that accepts user-supplied query strings. Attacker can alter Gremlin traversal logic within grammar-allowed characters to access unintended data.
Affected Version:
This issue affects Apache Atlas: from 0.8-incubating through 2.4.0.
For affected versions >= 2.0.0, the vulnerability is only exploitable when Atlas is deployed with below non-default configuration.
atlas.dsl.executor.traversal=false
Mitigation:
Users are recommended to upgrade to version 2.5.0, which fixes the issue.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.atlas:apache-atlas"
},
"ranges": [
{
"events": [
{
"introduced": "0.8"
},
{
"fixed": "2.5.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-40563"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-08T17:46:27Z",
"nvd_published_at": "2026-05-04T16:16:02Z",
"severity": "HIGH"
},
"details": "### Description:\nImproper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in Apache Atlas.\n\nApache Atlas exposes a DSL search endpoint that accepts user-supplied query strings. Attacker can alter Gremlin traversal logic within grammar-allowed characters to access unintended data.\n\n\n### Affected Version:\nThis issue affects Apache Atlas: from 0.8-incubating through 2.4.0.\n\n\nFor affected versions \u003e= 2.0.0, the vulnerability is only exploitable when Atlas is deployed with below non-default configuration.\n\n\n`atlas.dsl.executor.traversal=false`\n\n\n### Mitigation:\nUsers are recommended to upgrade to version 2.5.0, which fixes the issue.",
"id": "GHSA-35xx-9xrg-gwhf",
"modified": "2026-05-08T17:46:27Z",
"published": "2026-05-04T18:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40563"
},
{
"type": "PACKAGE",
"url": "https://github.com/apache/atlas"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread/vd0oggmqxl2k1skm0z2f9p0plx7jhmfl"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2026/05/03/9"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "Apache Atlas has a Code Injection Vulnerability"
}
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.