The alertmanager templates test endpoint (/api/alertmanager/grafana/config/api/v1/templates/test) can execute templates with no memory limits. Mass-executing templates in a short period causes OOM and crashes the Grafana service. The endpoint requires very low privileges and is exploitable with anonymous access enabled.
{
"severity": "Medium",
"cpes": [
"cpe:2.3:a:grafana:grafana:*:*:*:*:*:*:*:*"
]
}