# GHSA-PPW9-GF4R-5C39: Stored XSS in Social Wall post content via API (v-html without DOMPurify) (\< 2.0.3)

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2026-07-08
- Modified: 2026-07-08

## Tracked as

- [CVE-2026-55504](https://cve.now/CVE-2026-55504.md): Chamilo LMS stored XSS in social wall post content

## Affected versions

- chamilo/chamilo-lms (Packagist): through 2.0.2

## Description

## Vulnerability Details

**File (server-side sink)**: `src/CoreBundle/Entity/SocialPost.php`
**Line**: 259
**File (client-side sink)**: `assets/vue/components/social/SocialWallPost.vue`
**Line**: 83
**CWE**: CWE-79 — Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
**Severity**: High
**CVSS**: 8.0 — CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N

### Root Cause

The `SocialPost` API resource (`POST /api/social_posts`) accepts a JSON body with a `content` field. `SocialPost::setContent()` stores the value as-is with no XSS sanitization — no Symfony event listener, no API Platform normalizer, no entity lifecycle callback filters this field. Compare to `MessageNormalizer` (line 29) which correctly calls `Security::remove_XSS($data['content'], STUDENT)` for message content.

The stored content is later rendered in `SocialWallPost.vue` line 83 via Vue's `v-html` directive without calling `DOMPurify.sanitize()`, unlike `PageCard.vue` (line 47) and `TermsList.vue` (line 34) which already apply `DOMPurify` to their `v-html` usages.

### Impact

- **Auth required to trigger**: Yes (any `ROLE_USER` — student, teacher, any authenticated account)
- **Auth required to be affected**: Yes (authenticated users viewing social wall)
- **Consequence**: session hijacking of any user who views the attacker's social wall, including platform administrators
- **Scope**: all authenticated users — low-privilege attacker can target high-privilege victims

### Verification

Confirmed on Chamilo LMS v2.1.0 (PHP 8.2 / MariaDB 10.6 / Docker) on 2026-05-24.
Payload `<img src=x onerror=alert(document.cookie)>` posted via `POST /api/social_posts` and confirmed executing via `v-html` when any authenticated user views the social wall.

## References

- https://github.com/chamilo/chamilo-lms/security/advisories/GHSA-ppw9-gf4r-5c39

Page: https://cve.now/GHSA-PPW9-GF4R-5C39
