Summary
Stacklok Minder vulnerable to denial of service from maliciously crafted templates
Minder engine is susceptible to a denial of service from memory exhaustion that can be triggered from maliciously created templates.
Minder engine uses templating to generate strings for various use cases such as URLs, messages for pull requests, descriptions for advisories. In some cases can the user control both the template and the params for it, and in a subset of these cases, Minder reads the generated template entirely into memory. When Minders templating meets both of these conditions, an attacker is able to generate large enough templates that Minder will exhaust memory and crash.
One of these places is the REST ingester:
With control over both endpoint and retp on the following line:
… an attacker can make Minder generate a large template that Minder reads into memory on the following line by invoking endpoint.String():
Consider this example:
package main
import (
"fmt"
"html/template"
"os"
)
type EndpointTemplateParams struct {
// Params are the parameters to be used in the template
Params map[string]any
}
func main() {
retp := &EndpointTemplateParams{
Params: map[string]any{
"params": make([]string, 10),
},
}
fmt.Println(retp)
const templ = `
{{range $idx, $e := .Params.params}}
loooooooooooooooooooooooooooooooong-string-{{$idx}}
{{end}}
{{range $idx, $e := .Params.params}}
loooooooooooooooooooooooooooooooong-string-{{$idx}}
{{end}}
{{range $idx, $e := .Params.params}}
loooooooooooooooooooooooooooooooong-string-{{$idx}}
{{end}}`
tmpl := template.Must(template.New("").Parse(templ))
if err := tmpl.Execute(os.Stdout, retp); err != nil {
panic(err)
}
}
This example imitates the behavior on these lines:
Running this example generates the following template:
loooooooooooooooooooooooooooooooong-string-0
loooooooooooooooooooooooooooooooong-string-1
loooooooooooooooooooooooooooooooong-string-2
loooooooooooooooooooooooooooooooong-string-3
loooooooooooooooooooooooooooooooong-string-4
loooooooooooooooooooooooooooooooong-string-5
loooooooooooooooooooooooooooooooong-string-6
loooooooooooooooooooooooooooooooong-string-7
loooooooooooooooooooooooooooooooong-string-8
loooooooooooooooooooooooooooooooong-string-9
loooooooooooooooooooooooooooooooong-string-0
loooooooooooooooooooooooooooooooong-string-1
loooooooooooooooooooooooooooooooong-string-2
loooooooooooooooooooooooooooooooong-string-3
loooooooooooooooooooooooooooooooong-string-4
loooooooooooooooooooooooooooooooong-string-5
loooooooooooooooooooooooooooooooong-string-6
loooooooooooooooooooooooooooooooong-string-7
loooooooooooooooooooooooooooooooong-string-8
loooooooooooooooooooooooooooooooong-string-9
loooooooooooooooooooooooooooooooong-string-0
loooooooooooooooooooooooooooooooong-string-1
loooooooooooooooooooooooooooooooong-string-2
loooooooooooooooooooooooooooooooong-string-3
loooooooooooooooooooooooooooooooong-string-4
loooooooooooooooooooooooooooooooong-string-5
loooooooooooooooooooooooooooooooong-string-6
loooooooooooooooooooooooooooooooong-string-7
loooooooooooooooooooooooooooooooong-string-8
loooooooooooooooooooooooooooooooong-string-9
A malicious user can call the loop more times, increase the loop count and/or make the repeated long string longer to make the size of the template bigger.
A sufficiently large template will consume a lot of memory on this line which will exhaust memory on the machine and crash the Minder server:
Minder should enforce a limit to generated templates before reading them into memory.
The following templates are believed to be vulnerable:
Minder has a few other templates especially in its engine which needs reviewing too. As a default, all templates should be limited in size before Minder reads them into memory.
Impact
Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service. Typical impact: denial of service.
CVE-2024-35194 has a CVSS score of 5.3 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.0.50); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2024-35194? CVE-2024-35194 is a medium-severity uncontrolled resource consumption vulnerability in github.com/stacklok/minder (go), affecting versions < 0.0.50. It is fixed in 0.0.50. Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service.
- How severe is CVE-2024-35194? CVE-2024-35194 has a CVSS score of 5.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/stacklok/minder are affected by CVE-2024-35194? github.com/stacklok/minder (go) versions < 0.0.50 is affected.
- Is there a fix for CVE-2024-35194? Yes. CVE-2024-35194 is fixed in 0.0.50. Upgrade to this version or later.
- Is CVE-2024-35194 exploitable, and should I be worried? Whether CVE-2024-35194 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2024-35194 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2024-35194? Upgrade
github.com/stacklok/minderto 0.0.50 or later.