Conversation
| self.speculative_algorithm = SpeculativeAlgorithm.from_string( | ||
| server_args.speculative_algorithm | ||
| ) |
There was a problem hiding this comment.
Static Code Analysis Risk: Together python jinja2 ssti
User-controlled input is used as a Jinja2 template string (Server-Side Template Injection). Jinja2 templates can execute arbitrary Python code via class/mro traversal (CWE-94). Load templates from trusted static sources only; pass user data as render() variables, never as the template itself.
Severity: High 🚨
Status: Open 🔴
References:
- https://cwe.mitre.org/data/definitions/94
- https://portswigger.net/web-security/server-side-template-injection
- https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.Template
Suggested reviewers 🧐: @avnermay
More details:
If you see an issue, please contact Shasheen in the #security-engineering Slack channel.
Take action by replying with an [arnica] command 💬
Actions
Use [arnica] or [a] to interact with the Arnica bot to acknowledge or dismiss code risks.
To acknowledge the finding as a valid code risk: [arnica] ack <acknowledge additional details>
To dismiss the risk with a reason: [arnica] dismiss <fp|accept|capacity> <dismissal reason>
Examples
-
[arnica] ack This is a valid risk and I'm looking into it -
[arnica] dismiss fp Dismissed - Risk Not Accurate: (i.e. False Positive) -
[arnica] dismiss accept Dismiss - Risk Accepted: Allow the risk to exist in the system -
[arnica] dismiss capacity Dismiss - No Capacity: This will need to wait for a future sprint
| extra_max_context_len = 4 | ||
| if self.server_args.speculative_num_draft_tokens is not None: | ||
| extra_max_context_len += self.server_args.speculative_num_draft_tokens | ||
| if SpeculativeAlgorithm.from_string(self.server_args.speculative_algorithm).is_async(): |
There was a problem hiding this comment.
Static Code Analysis Risk: Together python jinja2 ssti
User-controlled input is used as a Jinja2 template string (Server-Side Template Injection). Jinja2 templates can execute arbitrary Python code via class/mro traversal (CWE-94). Load templates from trusted static sources only; pass user data as render() variables, never as the template itself.
Severity: High 🚨
Status: Open 🔴
References:
- https://cwe.mitre.org/data/definitions/94
- https://portswigger.net/web-security/server-side-template-injection
- https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.Template
Suggested reviewers 🧐: @avnermay
More details:
If you see an issue, please contact Shasheen in the #security-engineering Slack channel.
Take action by replying with an [arnica] command 💬
Actions
Use [arnica] or [a] to interact with the Arnica bot to acknowledge or dismiss code risks.
To acknowledge the finding as a valid code risk: [arnica] ack <acknowledge additional details>
To dismiss the risk with a reason: [arnica] dismiss <fp|accept|capacity> <dismissal reason>
Examples
-
[arnica] ack This is a valid risk and I'm looking into it -
[arnica] dismiss fp Dismissed - Risk Not Accurate: (i.e. False Positive) -
[arnica] dismiss accept Dismiss - Risk Accepted: Allow the risk to exist in the system -
[arnica] dismiss capacity Dismiss - No Capacity: This will need to wait for a future sprint
| ) | ||
|
|
||
| def _handle_speculative_decoding(self): | ||
| speculative_algorithm = SpeculativeAlgorithm.from_string(self.speculative_algorithm) |
There was a problem hiding this comment.
Static Code Analysis Risk: Together python jinja2 ssti
User-controlled input is used as a Jinja2 template string (Server-Side Template Injection). Jinja2 templates can execute arbitrary Python code via class/mro traversal (CWE-94). Load templates from trusted static sources only; pass user data as render() variables, never as the template itself.
Severity: High 🚨
Status: Open 🔴
References:
- https://cwe.mitre.org/data/definitions/94
- https://portswigger.net/web-security/server-side-template-injection
- https://jinja.palletsprojects.com/en/3.1.x/api/#jinja2.Template
Suggested reviewers 🧐: @avnermay
More details:
If you see an issue, please contact Shasheen in the #security-engineering Slack channel.
Take action by replying with an [arnica] command 💬
Actions
Use [arnica] or [a] to interact with the Arnica bot to acknowledge or dismiss code risks.
To acknowledge the finding as a valid code risk: [arnica] ack <acknowledge additional details>
To dismiss the risk with a reason: [arnica] dismiss <fp|accept|capacity> <dismissal reason>
Examples
-
[arnica] ack This is a valid risk and I'm looking into it -
[arnica] dismiss fp Dismissed - Risk Not Accurate: (i.e. False Positive) -
[arnica] dismiss accept Dismiss - Risk Accepted: Allow the risk to exist in the system -
[arnica] dismiss capacity Dismiss - No Capacity: This will need to wait for a future sprint
There was a problem hiding this comment.
Static Code Analysis Risk: Together python torch load
torch.load() detected (CVE-2025-32434, CVSS 9.8). In PyTorch <= 2.5.1, torch.load() enables arbitrary code execution even with weights_only=True. The weights_only flag does NOT provide the intended protection on affected versions. Use safetensors format for model weights, or ensure PyTorch >= 2.6.0 and validate model provenance before loading.
Severity: High 🚨
Status: Open 🔴
References:
- https://nvd.nist.gov/vuln/detail/CVE-2025-32434
- GHSA-53q9-r3pm-6pq6
- https://cwe.mitre.org/data/definitions/502
NOTE: This comment applies to line 251 but could not be created inline due to GitHub limitations.
Suggested reviewers 🧐: @avnermay
More details:
If you see an issue, please contact Shasheen in the #security-engineering Slack channel.
Take action by replying with an [arnica] command 💬
Actions
Use [arnica] or [a] to interact with the Arnica bot to acknowledge or dismiss code risks.
To acknowledge the finding as a valid code risk: [arnica] ack <acknowledge additional details>
To dismiss the risk with a reason: [arnica] dismiss <fp|accept|capacity> <dismissal reason>
Examples
-
[arnica] ack This is a valid risk and I'm looking into it -
[arnica] dismiss fp Dismissed - Risk Not Accurate: (i.e. False Positive) -
[arnica] dismiss accept Dismiss - Risk Accepted: Allow the risk to exist in the system -
[arnica] dismiss capacity Dismiss - No Capacity: This will need to wait for a future sprint
… SpeculationResponse
Motivation
Modifications
Accuracy Tests
Benchmarking and Profiling
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci