Description
Describe the bug
Making a POST request on /auth/token/revoke
with specific payload causes internal server error
To Reproduce
Hi, I was fuzzing vault and found this bug. To reproduce it, just run vault server -dev
and make a request. The request is described in enclosed zip (single JSON file inside). The JSON has also the curl
formated of the request, however, the request contains some wild unicode characters that your terminal may not like (at least mine does not 😄). Therefore is better to use the resender
utility that I made (along with the fuzzer). You may find it in my repo (github.com/matusf/openapi-fuzzer), with all installation instructions. Basically just run openapi-fuzzer-resender file.json
to make the request.
auth-token-revoke.zip
In the request is vault token supplied in the headers, however, it's not needed to reproduce this crash.
See error from request: {"errors":["no namespace"]}
In logs:
[WARN] core: error looking up namespace from the token's namespace ID: error="no namespace"
This issue might be related to #11306 and #11308 as there is the same response & log message.
Expected behavior
Response with non 500 status code.
Environment:
- Vault Server Version (retrieve with
vault status
):
{
"cluster_id": "ff96e72d-8a50-1574-3044-567db781e3c3",
"cluster_name": "vault-cluster-f4d3b0c5",
"initialized": true,
"migration": false,
"n": 1,
"nonce": "",
"progress": 0,
"recovery_seal": false,
"sealed": false,
"storage_type": "inmem",
"t": 1,
"type": "shamir",
"version": "1.7.0-rc1"
}
- Vault CLI Version (retrieve with
vault version
):Vault v1.7.0-rc1 (9af08a1c5f0f855984a1fa56d236675d167f578e)
- Server Operating System/Architecture: Ubuntu 18.04/x86_64