CVE-2025-6518
BaseFortify
Publication date: 2025-06-23
Last updated on: 2026-04-29
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-1336 | The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine. |
| CWE-791 | The product receives data from an upstream component, but does not completely filter special elements before sending it to a downstream component. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2025-6518 is a critical remote code execution vulnerability in PySpur-Dev's pyspur software up to version 0.1.18. It arises from unsafe usage of Jinja2 templates in the SingleLLMCallNode class, specifically in the user_message argument. This argument is rendered as a Jinja2 template without proper sanitization or neutralization of special elements, allowing an attacker to inject malicious template code. This can lead to arbitrary code execution on the server remotely by exploiting the template rendering process. [1, 2, 3]
How can this vulnerability impact me? :
This vulnerability can allow an attacker to execute arbitrary code remotely on the server running the vulnerable PySpur software. The attacker can gain shell access, run malicious commands, and potentially take full control of the affected system. This compromises the confidentiality, integrity, and availability of the system, leading to severe security risks including data breaches, system manipulation, and service disruption. [1, 2, 3]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring for suspicious API calls related to workflow creation and updates, specifically POST requests to /api/wf and PUT requests to /api/wf/S2 with unusual or malicious payloads in the user_message field. Additionally, network monitoring for unexpected reverse shell connections (e.g., incoming connections on uncommon ports like 8888) can indicate exploitation attempts. Commands to detect exploitation attempts include using network listeners such as `ncat -lvp 8888` to catch reverse shells, and inspecting logs for API calls that create or update workflows with suspicious template strings. You can also search your codebase or configuration for usage of Jinja2 Template.render() on user-controllable input without sanitization. [2]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include disabling or restricting access to the vulnerable PySpur API endpoints to prevent remote exploitation, especially the workflow creation and update endpoints. Avoid rendering user-controllable input directly with Jinja2 Template.render() without proper sanitization or sandboxing. If possible, replace or upgrade the affected PySpur component to a version that addresses this vulnerability or use an alternative product. Monitor network traffic for suspicious activity and consider applying network-level controls to block unexpected outbound connections that could be used for reverse shells. [3, 2]