Skip to content

Stored XSS in Miniflux when opening a broken image due to unescaped ServerError in proxy handler

Moderate
fguillot published GHSA-mqqg-xjhj-wfgw Mar 17, 2023

Package

gomod miniflux.app (Go)

Affected versions

<= 2.0.42

Patched versions

2.0.43

Description

Impact

Since v2.0.25, Miniflux will automatically proxy images served over HTTP to prevent mixed content errors.

When an outbound request made by the Go HTTP client fails, the html.ServerError is returned unescaped without the expected Content Security Policy header added to valid responses.

By creating an RSS feed item with the inline description containing an <img> tag with a srcset attribute pointing to an invalid URL like http:a<script>alert(1)</script>, we can coerce the proxy handler into an error condition where the invalid URL is returned unescaped and in full.

This results in JavaScript execution on the Miniflux instance as soon as the user is convinced (e.g. by a message in the alt text) to open the broken image.

An attacker can execute arbitrary JavaScript in the context of a victim Miniflux user when they open a broken image in a crafted RSS feed. This can be used to perform actions on the Miniflux instance as that user and gain administrative access to the Miniflux instance if it is reachable and the victim is an administrator.

Patches

PR #1746 fixes the problem. Available in Miniflux >= 2.0.43.

Workarounds

  • Disable image proxy (default value is http-only).

References

Severity

Moderate
4.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N

CVE ID

CVE-2023-27592

Weaknesses

Credits