CVE-2025-65089
Executive Summary
CVE-2025-65089 is an information disclosure vulnerability in the XWiki Remote Macros application, specifically within the "View File" macro. This flaw allows an authenticated user with no view rights on a page to view the content of an office attachment (e.g., .docx, .xlsx, .pptx) that is displayed using the viewfile macro. The vulnerability arises from improper access control checks when rendering the macro, bypassing standard page-level permissions. The CVSS score is 6.8 (Medium), and the EPSS probability is 0.0%, indicating a low likelihood of exploitation in the wild. No public proof-of-concept (PoC) or exploit code is available at this time. The vendor has released a patch in version 1.27.0.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the XWiki Remote Macros extension, which is distributed as a JAR file via the XWiki Extension Manager. Users should verify the integrity of the extension by checking its SHA-256 checksum against the official XWiki repository. The extension is not distributed via NPM, PyPI, Go, or Ruby registries.
CVSS Breakdown & Threat Level
- CVSS Score: 6.8 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (authenticated user)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: Low (disclosure of attachment content)
- Integrity Impact: None
- Availability Impact: None
Threat Level: Medium. The vulnerability requires authentication but allows unauthorized access to attachment content, potentially exposing sensitive information.
Deep Dive & Mechanics
The XWiki Remote Macros extension provides macros for migrating content from Confluence. The viewfile macro is used to display office attachments inline. The vulnerability exists because the macro does not enforce page-level view permissions when rendering the attachment. When a user with no view rights on a page accesses a page that contains a viewfile macro pointing to an attachment, the macro renders the attachment content without checking if the user has the necessary permissions.
The root cause is a missing permission check in the macro's rendering code. The macro retrieves the attachment content directly from the attachment reference, bypassing the standard XWiki access control layer. This allows an attacker to view the content of any office attachment on the wiki, even if they do not have view rights on the page where the attachment is stored.
Vulnerable vs. Patched Code
Vulnerable Code (prior to 1.27.0):
// Vulnerable: No permission check
public String renderViewFileMacro(String attachmentReference) {
Attachment attachment = getAttachment(attachmentReference);
// Directly renders the attachment content
return renderOfficeAttachment(attachment);
}
Patched Code (1.27.0):
// Patched: Permission check added
public String renderViewFileMacro(String attachmentReference) {
Attachment attachment = getAttachment(attachmentReference);
// Check if the current user has view rights on the page containing the attachment
if (!hasViewPermission(attachment.getDocument())) {
throw new AccessDeniedException("You do not have permission to view this attachment.");
}
return renderOfficeAttachment(attachment);
}
The patch adds a call to hasViewPermission() which verifies that the current user has view rights on the document (page) that contains the attachment. If the check fails, an AccessDeniedException is thrown, preventing the content from being displayed.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to an XWiki instance with the Remote Macros extension (version < 1.27.0) installed.
- A valid user account (any privilege level).
- A page containing a
viewfilemacro pointing to an office attachment on a page the user does not have view rights to.
Exploitation Steps:
- Identify a page that uses the
viewfilemacro to display an office attachment. - If the user does not have view rights on the page where the attachment is stored, they can still view the attachment content by accessing the page with the
viewfilemacro. - The macro will render the attachment content, bypassing the permission check.
Example URL:
http://target-xwiki/wiki/MySpace/MyPage?viewer=viewfile&attachment=MyAttachment.docx
Note: No public exploit code is available. The above is a conceptual exploitation scenario.
Blue Team
Detection:
- Monitor access logs for unusual patterns of
viewfilemacro usage, especially by users who do not have view rights on the page. - Look for repeated attempts to access attachments via the
viewfilemacro from low-privileged accounts.
Mitigation:
- Immediately upgrade to version 1.27.0 or later.
- If immediate upgrade is not possible, disable the
viewfilemacro by removing or commenting out the macro definition in the XWiki configuration. - Implement additional access control monitoring using XWiki's built-in audit logging.
Indicators of Compromise (IOCs)
- Log Entries: Access logs showing
viewfilemacro invocations for attachments on pages where the user lacks view permissions. - Network Traffic: HTTP requests to
/wiki/*/viewfileor similar endpoints with attachment references. - File Hashes: No specific file hashes are associated with this vulnerability.
Detection Engineering
YARA Rule
rule CVE_2025_65089_XWiki_ViewFile_Bypass {
meta:
description = "Detects potential exploitation of CVE-2025-65089 in XWiki Remote Macros"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2025-65089"
strings:
$macro = "viewfile" nocase
$attachment = "attachment" nocase
$bypass = "viewer=viewfile" nocase
condition:
all of them
}
Sigma Rule
title: XWiki ViewFile Macro Permission Bypass
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2025-65089 by accessing the viewfile macro without proper permissions.
author: Valters IT
date: 2025-04-01
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-65089
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains: "viewfile"
condition: selection
falsepositives:
- Legitimate use of the viewfile macro by authorized users
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-65089 XWiki ViewFile Macro Permission Bypass"; flow:to_server,established; content:"viewfile"; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade: Update the XWiki Remote Macros extension to version 1.27.0 or later.
- Disable Macro: If upgrade is not possible, disable the
viewfilemacro by removing its definition from the XWiki configuration. - Restrict Access: Ensure that only trusted users have access to pages that use the
viewfilemacro.
Long-Term Measures:
- Implement regular security audits of XWiki extensions.
- Use XWiki's built-in permission system to enforce least privilege.
- Monitor for similar vulnerabilities in other macros.
Patch Details:
- Fixed Version: 1.27.0
- Patch URL: https://github.com/xwiki-contrib/remote-macros/releases/tag/1.27.0
Valters IT