parisneo/lollms vulnerable to stored XSS in the social feature
User-supplied post content was stored without sanitisation and rendered in the Home Feed, so an attacker could inject JavaScript that runs in other users' browsers, including administrators'. This could lead to session hijacking, account takeover and wormable attacks.
parisneo/lollms
Originally disclosed on huntr
A Stored Cross-Site Scripting (XSS) vulnerability was identified in the social feature of parisneo/lollms, affecting the latest version 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. The issue is resolved in version 2.2.0.
From the GitHub Advisory Database (GHSA-8wrq-fv5f-pfp2, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The create_post function stored raw user content in the DBPost model without sanitisation, and the Home Feed rendered it without escaping.
Impact
An attacker could run JavaScript in the browsers of users viewing the Home Feed, including administrators, which could lead to account takeover, session hijacking and wormable attacks.
What the attacker needed
Ability to create a post; victim views the Home Feed
The fix
The issue was fixed in version 2.2.0.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a website saves text from a user and later shows it to others without cleaning it, someone can include hidden instructions that the browser treats as code. Here, a post could carry such code, and it would run for anyone who viewed the feed. That lets the attacker act as those viewers, including admins.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.