Description
AIRI is a self-hosted, artificial intelligence based Grok Companion. In v0.7.2-beta.2 in the `packages/stage-ui/src/components/MarkdownRenderer.vue` path, the Markdown content is processed using the useMarkdown composable, and the processed HTML is rendered directly into the DOM using v-html. An attacker creates a card file containing malicious HTML/JavaScript, then simply processes it using the highlightTagToHtml function (which simply replaces template tags without HTML escaping), and then directly renders it using v-html, leading to cross-site scripting (XSS). The project also exposes the Tauri API, which can be called from the frontend. The MCP plugin exposes a command execution interface function in `crates/tauri-plugin-mcp/src/lib.rs`. This allows arbitrary command execution. `connect_server` directly passes the user-supplied `command` and `args` parameters to `Command::new(command).args(args)` without any input validation or whitelisting. Thus, the previous XSS exploit could achieve command execution through this interface. v0.7.2-beta.3 fixes the issue.
EPSS Score:
0%
Comprehensive Technical Analysis of EUVD-2025-28983
1. Vulnerability Assessment and Severity Evaluation
The vulnerability described in EUVD-2025-28983 affects the AIRI self-hosted artificial intelligence-based Grok Companion, specifically in version v0.7.2-beta.2. The issue arises from improper handling of Markdown content, leading to cross-site scripting (XSS) and arbitrary command execution. The CVSS (Common Vulnerability Scoring System) base score of 9.7 indicates a critical severity level. The vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H highlights the following:
- Attack Vector (AV:N): Network-based attack.
- Attack Complexity (AC:L): Low complexity required for exploitation.
- Privileges Required (PR:N): No privileges are required.
- User Interaction (UI:R): Requires user interaction.
- Scope (S:C): Change in scope.
- Confidentiality (C:H): High impact on confidentiality.
- Integrity (I:H): High impact on integrity.
- Availability (A:H): High impact on availability.
2. Potential Attack Vectors and Exploitation Methods
Attack Vector 1: Cross-Site Scripting (XSS)
- Exploitation Method: An attacker can create a malicious card file containing HTML/JavaScript payloads. When this file is processed by the
highlightTagToHtmlfunction and rendered usingv-html, the malicious script executes in the user's browser context. - Impact: This can lead to session hijacking, unauthorized actions on behalf of the user, and data theft.
Attack Vector 2: Arbitrary Command Execution
- Exploitation Method: The Tauri API exposed by the project allows frontend calls to execute commands. The MCP plugin's command execution interface function in
crates/tauri-plugin-mcp/src/lib.rsdoes not validate or whitelist user-suppliedcommandandargsparameters. - Impact: An attacker can leverage the XSS vulnerability to execute arbitrary commands on the server, leading to complete system compromise.
3. Affected Systems and Software Versions
- Affected Software: AIRI self-hosted artificial intelligence-based Grok Companion.
- Affected Version: v0.7.2-beta.2.
- Fixed Version: v0.7.2-beta.3.
4. Recommended Mitigation Strategies
-
Immediate Action:
- Upgrade: Upgrade to version v0.7.2-beta.3 or later, which addresses the vulnerability.
- Patch: Apply the security patch available in the referenced GitHub commit.
-
Long-Term Mitigation:
- Input Validation: Implement robust input validation and sanitization for all user-supplied data.
- Output Encoding: Ensure proper HTML escaping and encoding of all output to prevent XSS.
- Least Privilege: Apply the principle of least privilege to restrict command execution capabilities.
- Regular Audits: Conduct regular security audits and code reviews to identify and mitigate similar vulnerabilities.
5. Impact on European Cybersecurity Landscape
The vulnerability poses a significant risk to organizations and individuals using the AIRI Grok Companion within the European Union. Given the critical nature of the vulnerability, it could lead to widespread data breaches, unauthorized access, and system compromises. The exposure of the Tauri API for command execution further amplifies the risk, potentially allowing attackers to gain full control over affected systems.
6. Technical Details for Security Professionals
Vulnerable Code Paths:
- MarkdownRenderer.vue: The
useMarkdowncomposable processes Markdown content, and the processed HTML is rendered directly into the DOM usingv-html. - highlightTagToHtml Function: This function replaces template tags without HTML escaping, leading to XSS.
- Tauri API: The MCP plugin's command execution interface function in
crates/tauri-plugin-mcp/src/lib.rspasses user-suppliedcommandandargsparameters toCommand::new(command).args(args)without validation.
Exploitation Steps:
-
XSS Exploitation:
- Create a malicious card file with embedded HTML/JavaScript.
- Process the file using the
highlightTagToHtmlfunction. - Render the processed HTML using
v-html.
-
Command Execution:
- Leverage the XSS vulnerability to call the Tauri API.
- Execute arbitrary commands by passing malicious
commandandargsparameters.
References:
Conclusion: The vulnerability in AIRI v0.7.2-beta.2 is critical and requires immediate attention. Organizations should prioritize upgrading to the patched version and implement robust security measures to prevent similar issues in the future. The European cybersecurity landscape must remain vigilant against such vulnerabilities to protect sensitive data and maintain system integrity.