☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.8 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N 🐛 CWE-613
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-39924

CVE-2026-39924 Vulnerability in Flarum
📅 PUBLISHED: 2026-08-05 00:00 UTC 🔄 UPDATED: 2026-09-23 20:25 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.22%
👁️
0.22% probability
5.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1078
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Patch available — upgrade to latest release
CVSS VECTOR BREAKDOWN 6.8
AV: N Attack Vector Network
AC: H Attack Complexity High
PR: L Privileges Required Low
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: H Integrity High
A: N Availability None
6.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-39924 is an improper session invalidation vulnerability in Flarum versions prior to 1.8.16. An attacker who has obtained a valid session token (e.g., via prior malware, an XSS event, or an intercepted bearer token) retains full account access even after the legitimate victim changes their password or has the password reset by an administrator. The flaw achieves a CVSS score of 6.8 due to high confidentiality and integrity impact, though exploitation requires valid credentials and demonstrates the lack of complete session revocation in the password-change workflow, turning a routine security event into the moment of maximum attacker persistence.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Technical Analysis

The vulnerability resides in Flarum's session management and password-change event handling before version 1.8.16. The NVD description outlines a specific flaw in the token-clearing logic, exposed via the TokensClearer::clearPasswordTokens() function and the access_tokens table.

The core issue is that a password-change event does not trigger a purge of all token tables. The clearing mechanism is demonstrably incomplete:

  1. Narrow Scope of Cleanup: The TokensClearer::clearPasswordTokens() function is designed to revoke tokens associated with a password-change event. However, its implementation only deletes rows from the password_tokens table. Tokens stored in the access_tokens table—which govern API bearer access and RememberAccessToken (long-lived login persistence)—are left entirely untouched.
  2. Session Cookie Continuity: Active session cookies authenticated via the access token mechanism remain valid. Because the database rows representing these sessions are not deleted, the attacker's session cookie continues to be validated server-side against a still-existent, marked-as-active row.
  3. API Bearer Token Persistence: Bearer tokens in the access_tokens table remain valid, providing the attacker with a direct API vector for data exfiltration (high confidentiality impact) and account manipulation (high integrity impact).
  4. Administrator Reset Inefficacy: The NVD description explicitly confirms that administrator-forced password resets—executed via the user update endpoint—are equally ineffective at revoking attacker-held sessions. This demonstrates that the underlying function is universally ignored (or bypassed) regardless of the password-change trigger (user-initiated or admin-initiated).

The attack surface is exposed predominantly through the web session layer and API layer. The flaw maps to CWE-613 (Insufficient Session Expiration), indicating the failure to terminate authenticated sessions after a security-sensitive event, allowing prolonged access with no intervention window being created by the password change.

Exploitation Scenarios

A successful attack chain proceeds as follows:

  1. Reconnaissance & Initial Access: The attacker first identifies a Flarum instance via Shodan (http.title:"Flarum"). The attacker then needs to acquire a valid session token. Common acquisition methods include exploiting XSS (stored in a post or profile), malware on the victim's device that dumps cookies/localStorage tokens, or a prior, separate compromise (e.g., malware or log sniffing) that exposes an API bearer token.
  2. Environment Configuration: Prior to the victim's password change, the attacker silently uses the stolen token to authenticate as the victim, maintaining a low-frequency poll to validate continued access (e.g., hitting a profile endpoint every 15 seconds). The attacker does not alter the account, keeping the victim's trust in the session's integrity.
  3. Weaponization & Trigger: The victim initiates a security-sensitive event (password change) or an admin forces a password reset. During this exact window, the attacker knows the system is changing auth material. However, the TokensClearer::clearPasswordTokens() function executes but fails to purge the access tokens. The attacker's existing session cookie or API token is not dropped from the server-side store.
  4. Payload/Exploitation Execution: Immediately after the password change completes, the attacker uses the still-valid bearer token against the /api endpoints. Since the access token row still exists, the attacker can modify the victim's account (change settings, read private messages, alter data, inject admin malicious content) or, leveraging the high integrity impact, escalate privileges by associating the victim's account with admin groups (if configured improperly).
  5. Post-Exploitation & Persistence: The attacker now has "post-password-change" persistent access. They can use this exact vector even after there is no usable password, as the token-based auth bypasses password knowledge. The attacker then plants backdoors, such as leaking profile fields, or waits for additional high-value data through the account's authorized API access.

The CVSS vector highlights the nuance: the attack requires high attack complexity (AC:H) since a valid session must be obtained, and low privileges (PR:L) once that token is held. The lack of user interaction (UI:N) and the network attack vector (AV:N) reinforce that once the token is stolen, exploitation is purely remote.

Impact Assessment

The business impact of this vulnerability is a collapse in post-change confidentiality and integrity.

  • Account Takeover: The attacker retains full account access (read/write) after the password change, negating the entire purpose of the security event.
  • Data Breach (C:H): Private conversations, administrative credentials, and paid subscriber content are continuously accessible via the API.
  • Data Integrity (I:H): An attacker can alter posts, delete records, or change profile data, resulting in defacement, tampering with forum content, and full account manipulation.
  • Availability Impact (A:N): No direct denial-of-service is present, but an attacker could lock the victim out by changing security questions or email addresses via the API, leading to an underlying availability loss to the account owner.
  • Blast Radius: All installations running Flarum < 1.8.16 are affected. The integrity of the central trust event (password change) is broken, so blame is often incorrectly placed on the victim or admin, leading to security operations confusion.

Detection Guidance

Sigma Rule

title: Multiple Flarum Session Uses Post Password Change
id: 5d3a37b0-8f2b-4e80-9a11-0a6d7c9e9f3d
status: experimental
description: Detects session token usage that persists after a password-change event in Flarum, indicating CVE-2026-39924 exploitation.
logsource:
    category: application
    product: flarum
detection:
    selection:
        event.category: authentication
        event.action: login
        user.name: '*'
    filter_before_change:
        event.dataset: flarum.api
        json.user_id: '%user.id%'
        json.action: password_change
        timestamp: '%timestamp%'
    filter_after_change:
        event.dataset: flarum.api
        json.user_id: '%user.id%'
        json.action: token_auth
    condition: (selection and filter_after_change) and not (filter_after_change.account_change) # Adjust based on log schema
    timeframe: 30s
level: high
falsepositives:
    - Legitimate parallel sessions from user's other devices (if the user has session sync enabled and the password change is done from a separate device while the other stays active, though this is still a risk).
fields:
    - user.name
    - src.ip
    - json.token_id

This rule assumes application-level logging of auth events (e.g., via nginx logs capturing token usage). It flags instances where API token activity is observed after the timestamp of a password-change event.

YARA Rule

rule CVE_2026_39924_Flarum_SessionBypass
{
    meta:
        author = "Valter Security Research"
        description = "Detects the presence of the vulnerable TokensClearer::clearPasswordTokens() function in Flarum source code."
        reference = "CVE-2026-39924"
        date = "2026-05-14"
        filetype = "PHP"
    strings:
        // vulnerable function definition
        $func_def = "function clearPasswordTokens" ascii
        // typical table name access
        $table_theta = "access_tokens" ascii
        $table_alpha = "password_tokens" ascii
        // Code smell: clearing without joining access_tokens
        $query_pw = "->delete" ascii
        $query_access = "access_tokens" ascii
    condition:
        (uint16(0) == 0x3C3F)  // <?php
        and $func_def
        and (
            // Vuln: function only references password_tokens
            ($table_alpha and not $table_theta)
            // or, it references both but has no delete on access_tokens inside its scope
            or ($table_alpha and $table_theta and not $query_pw) // crude logic
        )
}

This rule targets server-side source code detection during penetration testing or incident response to identify vulnerable code patterns.

Suricata IDS Rule

alert http any any -> $HOME_NET any (msg:"CVE-2026-39924 Flarum Session Bypass - API Access Post Password Change"; flow:established,to_server; content:"/api/"; http.uri; content:"token"; http.client_body; pcre:"/Authorization:\s*Bearer\s+[a-zA-Z0-9_-]+/i"; content:"password_change"; http.client_body; distance:0; within:512; classtype:attempted-user; sid:2026039924; rev:1;)

Note: This rule is conceptual. In production, detection is better suited to HTTP header inspection (Authorization) paired with application-level state (password change event) which Suricata alone cannot infer without knowing the victim's account state. This rule looks for API traffic containing a token specifically after a password change body string appears—challenging in stateless IDS, so it is most effective in a stateful app-aware proxy context or with Lua scripting to maintain TC connections.

Elastic Detection

sequence by user.id with maxspan=30s
  [ authentication where event.action == "password_change" and event.outcome == "success" ]
  [ http where http.request.method == "GET" and url.path=="/api/users" and http.request.headers.Authorization like "Bearer*" ]

This EQL rule alerts when a password change event is followed within 30 seconds by a successful API request using a Bearer token for the same user ID, indicating a token that should have been invalidated but wasn't.

Splunk SPL Query

index=web sourcetype=flarum:api 
  | search "action=password_change" 
  | transaction user_id maxspan=30s 
  | transaction user_id 
  | search "action=token_auth" 
  | eval risk_score = if(isnull(token_id), 75, 90) 
  | table _time, user_id, src_ip, token_id, method, uri_path 
  | stats count by user_id, src_ip, date_hour 
  | where count > 1

This query correlates API logs to find instances where a password change (action=password_change) is followed by token authentication (action=token_auth) from the same user ID, flagging when the token persists beyond the security event.

Wazuh OSSEC Rule

<group name="flarum,">
  <rule id="100153" level="12">
    <decoded_as>json</decoded_as>
    <field name="action">^password_change$</field>
    <description>Flarum: Password change performed - monitoring for subsequent token access</description>
    <group>authentication,flarum,</group>
  </rule>
  <rule id="100154" level="15" frequency="2" timeframe="30">
    <if_matched_sid>100153</if_matched_sid>
    <field name="action">^token_auth$</field>
    <description>CVE-2026-39924: Token auth detected post password change - session invalidation bypass likely</description>
    <mitre>
      <id>T1078</id>
    </mitre>
    <group>flarum,attack,t1078,</group>
  </rule>
</group>

The first rule detects the password change; the second rule, using frequency matching, triggers an alert if token auth occurs within 30 seconds of that password change, indicating the session wasn't invalidated.

Mitigation & Patch Guidance

Patch Confidence: 2/4 (CLAIMED — single source claims patch, not independently confirmed)

  1. Immediate Mitigations (while awaiting patch verification):

    • Force Logout: Manually delete all session identifiers in the access_tokens database table for affected users via SQL commands (e.g., DELETE FROM access_tokens;). This is a stopgap; users must be warned to re-authenticate.
    • Revoke Bearer Tokens: Trigger this same table cleanup whenever a password change occurs by adding a temporary MySQL trigger or cron script that purges tokens correlated with user_id after the update.
    • Disable Remember Me: If the product configuration allows, disable the RememberAccessToken feature to reduce long-lived token persistence.
  2. Patch/Upgrade Steps:

    • Upgrade to Flarum 1.8.16 (or latest patched version). The NVD description confirms the fix is introduced in this version, resolving the incomplete clear on password-change events.
    • After patching, verify the function now correctly purges access_tokens in a staging environment by initiating a password change and checking token revocation.
  3. Long-Term Hardening:

    • Implement defense-in-depth for session tokens: utilize short-lived tokens (e.g., 15-minute expiry) and require re-authentication for sensitive actions.
    • Deploy Web Application Firewall (WAF) rules to block API requests where an Authorization header is present immediately after a password change—though this is a brittle heuristic, it adds friction.
    • Conduct code audits of any custom auth extensions that hook into password-change events, ensuring they also revoke access tokens.
    • Move to an architecture that doesn't rely on a single table cleanup function—leverage a centralized Authentication Service (e.g., OAuth2) that can revoke all sessions in one atomic call.

References

  1. NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2026-39924
  2. Flarum Official Release Notes: https://flarum.org/ (Verify 1.8.16 changelog for the session invalidation fix)
  3. Flarum Security Advisory Board (Research): Community forums discussing the token clearing behavior in TokensClearer.
  4. CISA Known Exploited Vulnerabilities: No entry for this CVE (as of reporting date), though this status should be re-checked as ATT&CK workshops often document post-breach token reuse.
  5. MITRE ATT&CK Technique: https://attack.mitre.org/techniques/T1078/ (Valid Accounts)

Threat Actor Activity & Exploit-in-the-Wild Evidence: As of the writing of this report, there is no public evidence of active exploitation campaigns (Exploit Code: NO, PoC: UNKNOWN). The exploit complexity (requiring a valid token) limits opportunistic mass exploitation, making it a more likely vector for targeted attacks against high-profile forum communities or accounts with moderator/admin privileges. However, the persistence angle post-password-change makes it a valuable weapon in the post-exploitation kit of an attacker who has already achieved code execution or auth token theft via separately weaponized XSS or malware.

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

http.title:"Flarum"
http.component:"Flarum"
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-39924/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.