Category

Code Execution

Security vulnerabilities and automated fixes for code execution issues

9 posts found

high7 min

How Command Injection Happens in Node.js Child Process Calls and How to Fix It

A high-severity command injection vulnerability was discovered in Vite's `shared.js` file where the `gitExec()` function used `execSync()` with string concatenation, allowing potential shell metacharacter injection. The fix replaces `execSync()` with `spawnSync()` and passes Git arguments as an array instead of a shell string, eliminating the injection vector entirely.

#command-injection#javascript#nodejs+2 more
A
anupamme
Aug 27, 2026
high8 min

How Command Injection via Child Process Happens in Node.js and How to Fix It

A high-severity command injection vulnerability was discovered in `events/console/line.js` where user-controlled input was passed directly to `child_process.exec()`. The fix replaces the dangerous `exec()` function with the safer `execFile()` API, implements a strict whitelist of allowed commands, and adds comprehensive argument validation to prevent remote code execution.

#command-injection#node.js#child-process+4 more
A
anupamme
Aug 20, 2026
high8 min

How Command Injection Happens in Node.js Child Process Calls and How to Fix It

A high-severity command injection vulnerability was discovered in `bin/cli.js` where user-controlled input was passed directly to `execSync()` without sanitization, potentially allowing attackers to execute arbitrary shell commands. The fix replaces shell-based execution with `execFileSync()` using an argv array, eliminating the attack surface entirely. This proactive hardening prevents exploitation of the Claude plugin marketplace install/update/uninstall functionality.

#command-injection#nodejs#security+4 more
A
anupamme
Aug 16, 2026
critical6 min

How unsafe eval() code execution happens in JavaScript game scripting and how to fix it

A critical arbitrary code execution vulnerability was discovered in `scripts/CommandBlock.js` where user-provided input from a text dialog was directly concatenated into an `eval()` call without any sanitization or sandboxing. The fix replaces the dangerous `eval()` with a `new Function()` constructor, which provides better scope isolation and eliminates the string concatenation injection vector.

#security#javascript#eval-injection+4 more
A
anupamme
Jul 28, 2026
high6 min

How command injection happens in Ruby backticks and how to fix it

A Jekyll plugin used unsafe Ruby backticks to execute a `git log` command with an unescaped file path, creating a command injection vulnerability. By switching to `Open3.capture2()` with argument array syntax, the fix prevents shell interpretation and eliminates the attack surface entirely.

#ruby#command-injection#security+4 more
A
anupamme
Jul 24, 2026
critical7 min

How command injection happens in Node.js subprocess and how to fix it

A critical command injection vulnerability in `tools/dev/src/index.ts` allowed attackers to execute arbitrary shell commands through unsanitized subprocess arguments. The fix was simple but essential: explicitly setting `shell: false` in the `spawn()` call to prevent shell metacharacter interpretation. This vulnerability demonstrates why subprocess handling requires explicit security controls in Node.js.

#command-injection#node.js#security+4 more
O
orbisai0security
Jun 26, 2026
critical6 min

How buffer overflow happens in C memcpy() without length validation and how to fix it

A critical buffer overflow vulnerability was discovered in `src/script_engine/core/script_engine_core.c` at line 392, where `memcpy` copied an error message into a buffer without validating the source length against any maximum. The fix introduces a length cap of 4096 bytes and ensures proper null-termination, preventing heap corruption and potential remote code execution through crafted script error messages.

#security#buffer-overflow#c+4 more
O
orbisai0security
Jun 10, 2026
critical8 min

Critical Buffer Overflow in plugin.c: How Unsafe sprintf() Calls Enable Code Execution

A critical buffer overflow vulnerability was discovered and patched in plugin.c, where five unbounded sprintf() calls wrote into fixed-size buffers without validating input length. An attacker controlling NVMe device names or plugin metadata could exploit this to overwrite return addresses and achieve arbitrary code execution. The fix eliminates these unsafe calls, closing a classic but devastatingly effective attack vector.

#buffer-overflow#C#security+4 more
O
orbisai0security
May 13, 2026
critical5 min

Critical Buffer Overflow in Restore Utility: How Unbounded strcpy() Leads to Code Execution

A critical buffer overflow vulnerability was discovered and fixed in the system restore utility where unbounded strcpy() calls allowed attacker-controlled data to overflow fixed-size buffers. This classic C programming mistake could enable arbitrary code execution through crafted tape archives, highlighting why secure string handling remains essential in 2024.

#security#buffer-overflow#c-programming+4 more
O
orbisai0security
May 8, 2026