Headline
GHSA-9449-rphm-mjqr: AzuraCast Vulnerable to Pre-Auth File Deletion & Admin RCE
An API endpoint that is intended for internal use by the SFTP software sftpgo was mistakenly exposed to the public-facing HTTP API for AzuraCast installations.
This would allow a user with specific internal knowledge of a station’s operations to craft a custom HTTP request that would affect the contents of a station’s database, without revealing any internal information about the station.
With a request like:
curl -s -X POST "http://localhost/api/internal/sftp-event" -H "Content-Type: application/json" -d '{
"action": "pre-delete",
"username": "admin",
"path": "/var/azuracast/stations/test/media/test.mp3"
}'
A remote user could simulate a request from sftpgo informing the software that a file was about to be deleted from the path given. In anticipation of this, AzuraCast would delete the corresponding database record for that file. While AzuraCast would then later discover on its own that the file actually exists and recreate the media record, it would not have the same playlist associations or custom metadata as the previous instance of the media record in the database.
Some mitigating factors affecting the severity of this issue include:
- A user would need to know a valid SFTP username corresponding to the specific station in question.
- A user would need to know the internal filesystem structure of a station (or be able to brute-force or guess paths).
- Any call to this internal API endpoint does not return any information to the calling process about what files are present or aren’t, so no confidential internal information is revealed by this process.
Patched versions of AzuraCast specifically check that any calls to this internal URL are being called by the internal HTTP service, which only listens for activity on localhost and is not accessible from outside the container.
An API endpoint that is intended for internal use by the SFTP software sftpgo was mistakenly exposed to the public-facing HTTP API for AzuraCast installations.
This would allow a user with specific internal knowledge of a station’s operations to craft a custom HTTP request that would affect the contents of a station’s database, without revealing any internal information about the station.
With a request like:
curl -s -X POST "http://localhost/api/internal/sftp-event" -H "Content-Type: application/json" -d '{
"action": "pre-delete",
"username": "admin",
"path": "/var/azuracast/stations/test/media/test.mp3"
}'
A remote user could simulate a request from sftpgo informing the software that a file was about to be deleted from the path given. In anticipation of this, AzuraCast would delete the corresponding database record for that file. While AzuraCast would then later discover on its own that the file actually exists and recreate the media record, it would not have the same playlist associations or custom metadata as the previous instance of the media record in the database.
Some mitigating factors affecting the severity of this issue include:
- A user would need to know a valid SFTP username corresponding to the specific station in question.
- A user would need to know the internal filesystem structure of a station (or be able to brute-force or guess paths).
- Any call to this internal API endpoint does not return any information to the calling process about what files are present or aren’t, so no confidential internal information is revealed by this process.
Patched versions of AzuraCast specifically check that any calls to this internal URL are being called by the internal HTTP service, which only listens for activity on localhost and is not accessible from outside the container.
References
- GHSA-9449-rphm-mjqr
- AzuraCast/AzuraCast@34620db