2026-05-20 16:03:40 -05:00
|
|
|
// Phase 20 (Track M.2) — SQS Java vuln fixture.
|
2026-05-23 10:08:41 -05:00
|
|
|
|
|
|
|
|
import io.awspring.cloud.sqs.annotation.SqsListener;
|
2026-05-20 16:03:40 -05:00
|
|
|
|
|
|
|
|
public class Vuln {
|
|
|
|
|
public Vuln() {}
|
|
|
|
|
|
2026-05-23 10:08:41 -05:00
|
|
|
@SqsListener("jobs")
|
2026-05-20 16:03:40 -05:00
|
|
|
public void handleMessage(java.util.Map<String, String> env) throws Exception {
|
|
|
|
|
String body = env != null ? env.getOrDefault("Body", "") : "";
|
|
|
|
|
// SINK: tainted Body concatenated into shell command
|
|
|
|
|
new ProcessBuilder("sh", "-c", "echo " + body).inheritIO().start().waitFor();
|
|
|
|
|
}
|
|
|
|
|
}
|