The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-41887

CVE-2026-41887: Flarum SSRF Vulnerability

CVE-2026-41887 is an SSRF vulnerability in Flarum that allows authenticated administrators to inject LESS directives, enabling local file inclusion and server-side request forgery. This article covers technical details, affected versions, impact, and mitigation.

Published: May 18, 2026

CVE-2026-41887 Overview

Flarum is open-source forum software written in PHP. CVE-2026-41887 affects Flarum versions prior to 1.8.16 and 2.0.0-rc.1. The vulnerability stems from an incomplete fix for CVE-2023-27577. The original patch restricted @import and data-uri() LESS features in the custom_less setting but failed to apply the same restriction to other settings registered as LESS configuration variables. An authenticated administrator can inject a malicious @import directive through settings such as theme_primary_color, enabling local file inclusion (LFI) or server-side request forgery (SSRF) [CWE-22].

Critical Impact

Authenticated administrators can read arbitrary files reachable by the PHP process or trigger outbound HTTP(S) requests from the server, exposing internal services and sensitive filesystem contents.

Affected Products

  • Flarum versions prior to 1.8.16
  • Flarum 2.x versions prior to 2.0.0-rc.1
  • Any Flarum extension registering settings via Extend\Settings::registerLessConfigVar()

Discovery Timeline

  • 2026-05-08 - CVE-2026-41887 published to NVD
  • 2026-05-12 - Last updated in NVD database

Technical Details for CVE-2026-41887

Vulnerability Analysis

Flarum compiles forum styles from LESS source at runtime. Administrator-controlled settings registered as LESS config variables are interpolated verbatim into that source before compilation. The original CVE-2023-27577 patch only screened the custom_less setting for the @import and data-uri() directives. Other settings registered through Extend\Settings::registerLessConfigVar() such as theme_primary_color and theme_secondary_color bypassed validation entirely.

When a crafted value reaches the LESS compiler, the parser honors @import (inline) '<path>'. The directive accepts both local file paths and remote URLs. This allows an attacker to read files accessible to the PHP process or initiate outbound requests to arbitrary hosts. The compiled output forum.css exposes the loaded content directly to anyone who can fetch the stylesheet.

Root Cause

The root cause is incomplete input validation in framework/core/src/Forum/ValidateCustomLess.php. The validation regex /@import|data-uri\s*\(/i was applied only to custom_less. Other LESS-bound settings were treated as trusted strings and concatenated into the compilation context without sanitization.

Attack Vector

Exploitation requires authenticated administrator access. The attacker submits a malicious value through the admin appearance configuration, supplying a payload such as red; @import (inline) '/etc/passwd'; to a registered LESS variable. On the next style compilation, the LESS parser dereferences the import and embeds the file contents or remote response into forum.css. The attacker then retrieves the compiled CSS to extract data or pivot to internal HTTP endpoints.

php
             return;
         }
 
-        // Restrict what features can be used in custom LESS
-        if (isset($event->settings['custom_less']) && preg_match('/@import|data-uri\s*\(/i', $event->settings['custom_less'])) {
-            $translator = $this->container->make(TranslatorInterface::class);
+        // Restrict what features can be used in custom LESS. This applies to
+        // the `custom_less` setting as well as any setting registered as a
+        // LESS config variable (e.g. `theme_primary_color`), since those
+        // values are interpolated directly into the LESS source.
+        $lessFeatureKeys = array_merge(
+            isset($event->settings['custom_less']) ? ['custom_less'] : [],
+            array_intersect(
+                array_keys($event->settings),
+                array_column($this->customLessSettings, 'key')
+            )
+        );
+
+        foreach ($lessFeatureKeys as $key) {
+            if (is_string($event->settings[$key]) && preg_match('/@import|data-uri\s*\(/i', $event->settings[$key])) {
+                $translator = $this->container->make(TranslatorInterface::class);
 
-            throw new ValidationException([
-                'custom_less' => $translator->trans('core.admin.appearance.custom_styles_cannot_use_less_features')
-            ]);
+                throw new ValidationException([
+                    $key => $translator->trans('core.admin.appearance.custom_styles_cannot_use_less_features')
+                ]);
+            }
+        }

Source: Flarum framework commit 2d90a1f1

Detection Methods for CVE-2026-41887

Indicators of Compromise

  • Unexpected @import or data-uri( substrings present in any setting row of the Flarum database settings table, especially keys like theme_primary_color or theme_secondary_color.
  • Outbound HTTP(S) requests originating from the PHP-FPM or web server process to attacker-controlled hosts during LESS compilation events.
  • Contents of sensitive local files (for example /etc/passwd, .env, or application secrets) appearing inside the published forum.css asset.
  • Audit log entries showing administrator updates to color or theme settings that contain unexpected punctuation, semicolons, or quoted paths.

Detection Strategies

  • Search the compiled forum.css and the assets/ directory for @import directives or fragments of filesystem content that should not appear in stylesheets.
  • Query the settings table for any value matching the regex /@import|data-uri\s*\(/i across all keys, not only custom_less.
  • Correlate administrator login events with subsequent settings changes and unusual outbound network connections from the application host.

Monitoring Recommendations

  • Enable egress filtering on the application server and alert on connections to hosts not on an allowlist of CDN, package, and update endpoints.
  • Log every change to Flarum settings through the admin API and forward events to a centralized log store for review.
  • Monitor PHP file access syscalls for reads of sensitive paths originating from the LESS compilation process.

How to Mitigate CVE-2026-41887

Immediate Actions Required

  • Upgrade Flarum to version 1.8.16 or 2.0.0-rc.1 without delay.
  • Audit the settings table for any prior injection of @import or data-uri() payloads and revert affected values.
  • Rotate any credentials, API keys, or tokens stored in files readable by the web server, since they may have been exfiltrated through the compiled CSS.
  • Review administrator accounts and revoke access for any unrecognized or stale users.

Patch Information

Flarum addressed the issue in v1.8.16 and v2.0.0-rc.1. The fix extends the existing @import and data-uri() filter to every setting registered as a LESS configuration variable. Full technical context is available in the GitHub Security Advisory GHSA-xjvc-pw2r-6878.

Workarounds

  • Restrict administrator access to a minimum set of trusted accounts and enforce strong multi-factor authentication on each.
  • Manually validate that no LESS-bound setting in the database contains @import or data-uri( substrings until the patch is applied.
  • Run the PHP process under a least-privilege filesystem context that cannot read application secrets or other sensitive files.
  • Block outbound network access from the web server to internal cloud metadata endpoints such as 169.254.169.254 to limit SSRF impact.
bash
# Upgrade Flarum via Composer to the fixed release
composer require flarum/core:^1.8.16
php flarum cache:clear
php flarum migrate

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

  • Vulnerability Details
  • TypeSSRF

  • Vendor/TechFlarum

  • SeverityMEDIUM

  • CVSS Score4.9

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Commit Details

  • GitHub Release v1.8.16

  • GitHub Release v2.0.0-rc.1

  • GitHub Security Advisory GHSA-xjvc-pw2r-6878
  • Related CVEs
  • CVE-2026-30913: Flarum Nicknames Extension XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

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.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English