---
title: "GET /cmdInjection/exec.Command/query/{safety}"
method: GET
path: "/cmdInjection/exec.Command/query/{safety}"
tags: ["cmd_injection"]
---

# GET /cmdInjection/exec.Command/query/{safety}

`GET /cmdInjection/exec.Command/query/{safety}`

demonstrates Command Injection via query, with vulnerable function exec.Command

## Path parameters

- `safety` 'safe' | 'unsafe' | 'noop', required

## Query parameters

- `input` string, required

## Response `200`

returns the rendered response as a string

## Other responses

- `default` — Error occured

## Changes

- **2022-06-08** `3278ae6dd37b` — 3 info
  - api operation id `getQueryCommand` removed and replaced with `CmdInjectionGetQueryCommand`
  - api tag `cmd_injection` added
  - api tag `cmd-injection` removed
- **2022-05-20** `85d605e45f9e` — 3 info
  - api operation id `CmdInjectionGetQueryCommand` removed and replaced with `getQueryCommand`
  - api tag `cmd-injection` added
  - api tag `cmd_injection` removed

[Change history](https://skmtc.dev/contrast-security-oss/apis/swagger-bench/changes/cmdInjection/exec.Command/query/:safety/get.md)

---

[API](https://skmtc.dev/contrast-security-oss/apis/swagger-bench.md) · [All operations](https://skmtc.dev/contrast-security-oss/apis/swagger-bench/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/contrast-security-oss/swagger-bench/revisions/b9f3634ff033/schema)
