# marked@15.0.12 security report (npm)

- Verdict: **Needs review** (risk level: medium)
- Scanned: 2026-10-06T14:19:22.000Z
- Files reviewed: 5
- Findings: 1 medium, 2 low severity findings
- Report: https://security.togoder.click/npm/marked
- Source: Togoder Security (https://security.togoder.click), AI source-code review

## Summary

Togoder Security scanned the npm package marked@15.0.12 on Oct 6, 2026. An AI review of 5 source files produced 1 medium, 2 low severity findings. The overall verdict is medium: the findings flag risky but common patterns (dynamic code, unsafe defaults, broad file or network access) rather than confirmed malware.

## Findings

### [medium] Dynamic code execution via config file loading

Finding ID: `NPS-2E745A1D842B`

File: `bin/main.js:150`

The `runConfig` function dynamically loads and executes arbitrary JavaScript/JSON config files specified by the user via `--config` or default locations like `~/.marked.json`, `~/.marked.js`, and `~/.marked/index.js`. It uses `require(configFile)` or `import('file:///' + configFile)`, which can execute arbitrary code if an attacker can place a malicious file in one of these locations or trick the user into using a malicious config. While this is a legitimate feature, it represents a potential security risk if untrusted config files are used.

### [low] Spawning external process

Finding ID: `NPS-7220B8A27246`

File: `bin/main.js:27`

The `help` function spawns the `man` command to display manual pages. This is expected behavior for a CLI tool and does not appear malicious, but it is a process spawn that could be abused if the environment is compromised (e.g., PATH manipulation).

### [low] File system access outside package scope

Finding ID: `NPS-4674AF817484`

File: `bin/main.js:140`

The code reads and writes files based on user input and default config paths, including home directory files. This is typical for a CLI tool but could be used to read/write arbitrary files if an attacker controls arguments. No evidence of malicious intent.

## Files reviewed

- `bin/main.js` (medium): The code is a legitimate Markdown CLI tool but includes dynamic config loading that could execute arbitrary code, posing a medium risk if untrusted configs are used.
- `bin/marked.js` (safe): No malicious patterns detected; the file is a simple CLI entry point that sets a process title and invokes the package's main function.
- `lib/marked.cjs` (safe): No malicious patterns detected; this is a legitimate generated build of the marked markdown parser, containing only parser logic with no network, filesystem, process, credential-harvesting, or dynamic code execution behavior.
- `lib/marked.esm.js` (safe): This is the well-known marked Markdown parser library (v15.0.12, MIT licensed); it contains only markdown parsing/rendering logic, uses no network, filesystem, process-execution, eval, or obfuscated code, and exhibits no malicious patterns.
- `lib/marked.umd.js` (safe): No malicious patterns detected in the marked library UMD bundle; it is a standard markdown parser with no exfiltration, code execution, or install-time hooks.

AI analysis is guidance, not a guarantee. Methodology: https://security.togoder.click/methodology
