Submit #860031: Node.js jsforce 3.10.16 OS Command Injectioninfo

TitelNode.js jsforce 3.10.16 OS Command Injection
Beschreibung[email protected] appears to have a command injection issue in the CLI when the SFDX connection registry is enabled. The public jsforce CLI exposes -c, --connection [connection] as a connection name stored in the connection registry. When JSFORCE_CONNECTION_REGISTRY=sfdx is set, the CLI uses SfdxRegistry. The connection name is passed as the -u option to the Salesforce CLI command, but it is concatenated into a shell command string without escaping. Affected path: bin/jsforce -> lib/cli/cli.js -> registry.getConnectionConfig(options.connection) -> lib/registry/sfdx.js -> child_process.exec(cmd) Relevant code in lib/registry/sfdx.js: _createCommand(command, options = {}, args = []) { return `${this._cliPath ? this._cliPath + '/' : ''}sfdx ${command} ${Object.keys(options) .map((option) => `${option.length > 1 ? '--' : '-'}${option}${options[option] != null ? ' ' + options[option] : ''}`) .join(' ')} --json ${args.join(' ')}`; } async _execCommand(command, options = {}, args = []) { const cmd = this._createCommand(command, options, args); child_process.exec(cmd, ...); } When a crafted connection name is supplied, the generated command becomes similar to: sfdx force:org:display -u x;touch /tmp/jsforce-pwn;# --json The shell interprets ;touch /tmp/jsforce-pwn;# as an additional command.
Quelle⚠️ https://github.com/jsforce/jsforce/issues/1805
Benutzer
 wjm2 (UID 99050)
Einreichung16.06.2026 15:18 (vor 1 Monat)
Moderieren21.07.2026 17:54 (1 month later)
StatusAkzeptiert
VulDB Eintrag380946 [jsforce bis 3.10.16 SFDX Connection Registry lib/registry/sfdx.js _execCommand erweiterte Rechte]
Punkte20

Do you need the next level of professionalism?

Upgrade your account now!