All challenges

request-baskets SSRF

webmedium300pts

request-baskets SSRF

CVE-2023-27163 is a server-side request forgery in request-baskets 1.2.1 and earlier. A basket's forward_url is validated for syntax only, so an unauthenticated client can point it at an internal address and, with response proxying on, have the server fetch it and hand back the body. A loopback-only flag service inside the container is the intended target.

How to reach it

Run the challenge locally with its docker-compose. The flagger sidecar writes your per-run flag to /flag/flag.txt, which a loopback-only service inside the container serves. The app speaks HTTP on port 8080; the basket API is the entry point.

Run this challenge

Spin it up locally with Docker. The flagger sidecar fetches a per-run flag into a shared volume, then the challenge container boots and reads it.

compose.yml
services:
  flagger:
    image: matejbasic/rootcause-flagger:1.0
    environment:
      ROOTCAUSE_API_URL: https://root-cause-api.matejbasic.com
      ROOTCAUSE_API_KEY: ${ROOTCAUSE_API_KEY}
      ROOTCAUSE_CHALLENGE: request-baskets-ssrf
      FLAG_PATH: /flag/flag.txt
    volumes:
      - flag:/flag
  challenge:
    image: matejbasic/cve-2023-27163:1.0
    depends_on:
      flagger:
        condition: service_completed_successfully
    environment:
      FLAG_PATH: /flag/flag.txt
    volumes:
      - flag:/flag
    ports:
      - "8080:8080"
volumes:
  flag:
one-line CLI
rootcause start request-baskets-ssrf

The rootcause CLI does all of this in one command. Running a challenge needs your API key, which you generate in your profile.