Skip to main content
Vulnerability Database/CVE-2025-31483

CVE-2025-31483: Miniflux Feed Reader XSS Vulnerability

CVE-2025-31483 is a cross-site scripting flaw in Miniflux feed reader that allows attackers to bypass Content Security Policy protections. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-31483 Overview

Miniflux, an open-source feed reader, contains a cross-site scripting vulnerability [CWE-79] in its media proxy route. A weak Content Security Policy (CSP) on the /proxy/* endpoint allows attackers to bypass CSP restrictions and execute JavaScript when users open proxied external images in a new browser tab or window. The issue stems from the default-src 'self' directive, which permits script execution within the same origin context. The vulnerability affects Miniflux versions prior to 2.2.7 and was fixed by replacing the permissive CSP with default-src 'none'; form-action 'none'; sandbox;.

Critical Impact

Authenticated attackers can inject arbitrary JavaScript into a victim's browser session when the user opens a malicious proxied image, potentially leading to session theft or account compromise.

Affected Products

  • Miniflux feed reader versions prior to 2.2.7
  • Deployments exposing the /proxy/* media proxy route
  • Self-hosted Miniflux instances serving external image content

Discovery Timeline

  • 2025-04-03 - CVE CVE-2025-31483 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-31483

Vulnerability Analysis

Miniflux proxies external media through its /proxy/* route to protect user privacy and avoid mixed-content issues. The route originally applied a Content Security Policy of default-src 'self', which treats proxied content as same-origin. When a user opens a proxied image in a new tab, the browser renders the response in a top-level browsing context. An attacker who controls the external image URL can serve HTML or SVG containing JavaScript. Because the CSP permits scripts from the same origin, the browser executes the payload under the Miniflux origin. This grants the attacker access to cookies, local storage, and authenticated API endpoints belonging to the victim's Miniflux session.

Root Cause

The root cause is an overly permissive CSP applied to untrusted, user-controlled content. The media proxy relayed arbitrary bytes from third-party servers but failed to isolate them with a restrictive policy. The default-src 'self' value allowed inline and same-origin script execution, defeating the purpose of CSP for untrusted responses.

Attack Vector

Exploitation requires an authenticated Miniflux user to subscribe to a feed controlled or influenced by the attacker. The attacker publishes a feed item referencing a malicious image URL. When the victim opens the proxied image in a new tab, the browser renders attacker-controlled content with script execution privileges on the Miniflux origin.

go
// Patch: internal/http/response/response.go
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package response

// ContentSecurityPolicyForUntrustedContent is the default CSP for untrusted content.
// default-src 'none' disables all content sources
// form-action 'none' disables all form submissions
// sandbox enables a sandbox for the requested resource
const ContentSecurityPolicyForUntrustedContent = `default-src 'none'; form-action 'none'; sandbox;`

Source: GitHub Commit cb695e6

Detection Methods for CVE-2025-31483

Indicators of Compromise

  • Requests to /proxy/* returning non-image MIME types such as text/html or image/svg+xml
  • Feed entries containing image references pointing to attacker-controlled domains with suspicious payloads
  • Browser console errors or unexpected JavaScript execution originating from the Miniflux origin
  • Session anomalies such as unexpected API calls or configuration changes shortly after a user opened a proxied image

Detection Strategies

  • Inspect HTTP response headers on /proxy/* responses for the presence of the hardened CSP string default-src 'none'; form-action 'none'; sandbox;
  • Review reverse proxy or application logs for /proxy/* requests returning content types other than standard image formats
  • Correlate feed subscription events with subsequent anomalous session activity for the same user account

Monitoring Recommendations

  • Enable CSP violation reporting on the Miniflux domain to capture bypass attempts
  • Monitor outbound fetches performed by the media proxy for requests to newly observed or low-reputation domains
  • Alert on authenticated API calls that occur immediately after a /proxy/* request from the same session

How to Mitigate CVE-2025-31483

Immediate Actions Required

  • Upgrade all Miniflux instances to version 2.2.7 or later, which ships the hardened CSP for untrusted content
  • Audit feed subscriptions for untrusted sources and remove feeds from unknown publishers
  • Invalidate active user sessions after upgrading to force reauthentication

Patch Information

The fix is included in Miniflux 2.2.7. The commit introduces a reusable ContentSecurityPolicyForUntrustedContent constant with the value default-src 'none'; form-action 'none'; sandbox; and applies it to the media proxy and error response handlers. See the GitHub Security Advisory GHSA-cq88-842x-2jhp and the upstream patch commit for details.

Workarounds

  • Place Miniflux behind a reverse proxy that rewrites the Content-Security-Policy header on /proxy/* responses to default-src 'none'; form-action 'none'; sandbox;
  • Restrict Miniflux access to trusted users and prohibit subscriptions to untrusted feed sources until the patch is applied
  • Educate users to avoid opening proxied images in new tabs or windows while running vulnerable versions
bash
# Nginx reverse proxy override for the /proxy/ route
location /proxy/ {
    proxy_pass http://miniflux_backend;
    proxy_hide_header Content-Security-Policy;
    add_header Content-Security-Policy "default-src 'none'; form-action 'none'; sandbox;" always;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.