Path Traversal in flarum/core (CVE-2026-41887)
Summary
Path traversal in flarum/core (CVE-2026-41887). Confidential information can be exposed externally. Exploitable via POST /api/settings. Mitigation: upgrade to 2.0.0-rc.1 or later.
Original description
The description as published by the source.
Summary
Flarum's patch for CVE-2023-27577 restricted the @import and data-uri() LESS features in the custom_less setting, but the same restriction was never applied to other settings registered as LESS config variables (for example theme_primary_color and theme_secondary_color, as well as any key registered via Extend\Settings::registerLessConfigVar()).
Those values are interpolated verbatim into the LESS source at compile time, allowing an authenticated administrator to craft a theme-color value that injects an arbitrary @import directive into the compiled forum.css. Because the underlying LESS parser honours @import (inline) '', an attacker can read arbitrary files reachable by the PHP process (local file inclusion) or trigger outbound HTTP(S) requests (server-side request forgery).
Impact
An attacker who has compromised — or legitimately obtained — an administrator account can:
- Read arbitrary local files reachable by the PHP process (e.g.
/etc/passwd,.env, config files containing database credentials, OAuth secrets, API keys). - Trigger outbound HTTP/HTTPS requests from the Flarum host, enabling SSRF against internal services and cloud metadata endpoints such as
http://169.254.169.254/(AWS IMDSv1, GCP, Azure).
The contents of the attacker-controlled import are embedded into the compiled forum.css, which is publicly served — so the attacker can re…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-41887 has been found in flarum/core.
Attackers can target a specific entry point like POST /api/settings over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 4.9/10.
What to do: upgrade flarum/core to 2.0.0-rc.1 or later.
If unsure, ask your IT team or search "flarum/core CVE-2026-41887" on the vendor's site.
CVE-2026-41887 (flarum/core) — CWE-22 / CVSS v3 4.9
Attack vector: remote (network-reachable) / no user interaction
Attack surface: POST /api/settings / custom_less / theme_primary_color / theme_secondary_color
Patched: 2.0.0-rc.1 — apply immediately
Workaround: - Ensure administrator accounts are protected with strong, unique passwords and (where supported) two-factor authentication.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Path traversal (CWE-22) exists in flarum/core. Attackers reach the vulnerable code path via POST /api/settings.
Check the vendor advisory for the affected versions of flarum/core. Attack surface: POST /api/settings / custom_less / theme_primary_color / theme_secondary_color.
Severity: Medium (CVSS 4.9/10). Confidential information can be exposed externally.
Update to 2.0.0-rc.1.
Workaround: - Ensure administrator accounts are protected with strong, unique passwords and (where supported) two-factor authentication.
Search webserver/proxy logs for unusual POST /api/settings requests with malformed payloads or SQL meta-characters. Run grep -r 'flarum/core' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'flarum/core' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
flarum/coreを grep し、稼働しているサービス・バージョンを把握する。 -
2Hunt for indicators of compromise detect
grep 'POST /api/settings' /var/log/nginx/access.log | grep -E '(unusual_payload|sqli_pattern)'アクセスログで
POST /api/settingsへの異常なリクエスト (不正な認証ヘッダ・SQLメタ文字)を過去 30〜90日分捜索。WAF/SIEM があれば該当パスのアラート発火履歴を確認。 -
3Apply temporary workaround mitigate
- Ensure administrator accounts are protected with strong, unique passwords and (where supported) two-factor authentication.パッチが適用されるまでの応急処置として、- Ensure administrator accounts are protected with strong, unique passwords and (where supported) two-factor authentication. を実施。回避策の副作用 (機能低下) を確認した上で。
-
4Apply patch patch
Upgrade flarum/core to 2.0.0-rc.1ステージング環境で 2.0.0-rc.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 2 で見つけた異常検知の続報チェックを含めること。
-
5Post-deployment verification verify
Replay attack against POST /api/settings on staging to confirm patch closes the vectorパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 2 と同じログクエリでアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com