// [CRUCIBLE-SEED] // category: command_injection // severity: critical // language: csharp // expected: Command injection via Process.Start with user-controlled email and report path using System.Diagnostics; using Microsoft.AspNetCore.Mvc; namespace App.Controllers { [ApiController] [Route("api/[controller]")] public class ReportMailerController : ControllerBase { [HttpPost] public IActionResult Send([FromQuery] string email, [FromQuery] string reportPath) { // Vulnerable: email and reportPath injected into sendmail command string cmd = $"sendmail {email} < {reportPath}"; Process.Start("/bin/sh", $"-c \"{cmd}\"")?.WaitForExit(); return Ok("Report sent"); } } }