T09 · Insecure Skill Coding Practices
- Location
cli/lx-music-cli.js:182- Finding
Shell Command Injection Through Playlist Identifiers
- Content
View full analysis
'); console.log(' Use the list command to view playlist IDs'); process.exit(1); } const dbPath3 = getLxDataDbPath(); if (!fs.existsSync(dbPath3)) { console.log(`❌ Database does not exist: ${dbPath3}`); process.exit(1); } const scriptPath2 = path.join(__dirname, 'list.py'); try { const playResult = execSync(`python "${scriptPath2}" play "${listId2}" --db "${dbPath3}"`, { encoding: 'utf-8', timeout: 10000 }); const pr = JSON.parse(playResult); if (pr.error) { console.log(`❌ ${pr.error}`); } else { console.log(`▶️ Playing playlist: ${pr.source}/${pr.sourceId}`); } } catch (err) { console.log(`❌ Playback failed: ${err.message}`); } break; } ``` ### Technical Analysis The `listsongs` and `listplay` commands obtain playlist identifiers directly from `process.argv`. These values are interpolated into command strings passed to `child_process.execSync`. `execSync` executes string commands through a system shell. E ...[truncated 1688 chars]- Remediation
View remediation
