Summary
CamaleonCMS contains a stored cross-site scripting vulnerability in the cama_contact_form plugin that permits low-privileged authenticated users to submit unsanitized HTML through the contact form editing workflow. Malicious content may be stored in the database and execute in the browsers of users who view the affected form, potentially enabling session theft or actions performed with the victim's privileges.
Affected context
The issue occurs in CamaleonCMS deployments that use the cama_contact_form plugin and allow a low-privileged authenticated account to reach the contact form edit functionality. Risk is increased when the before_html field is rendered without context-appropriate output encoding and the endpoint does not sufficiently restrict which users may modify form content.
Exploit preconditions
- Attack surface: The authenticated contact form editing endpoint and the
before_html field
- Required access: A low-privileged authenticated CamaleonCMS account with
sufficient access to submit or modify contact form data
- Trigger point: A victim loads a contact form or page that renders the
persisted before_html value
- Why exploitation is possible: User-controlled content is stored without
adequate sanitization or output encoding, while authorization checks may
allow unintended accounts to modify the field
Why this happens
The underlying bug is a failure to treat editable HTML as untrusted content at both the authorization and rendering boundaries. Persisting attacker- controlled markup and later rendering it without context-appropriate encoding allows browser-executable content to run in another user's security context. The described weakness is primarily associated with cross-site scripting; the supplied vulnerability classification identifies CWE-89.
Potential impact
- Malicious scripts may execute in the browsers of users viewing the affected form
- Session identifiers or other sensitive browser-accessible data could be exposed
- Attackers could forge authenticated requests against administrative interfaces
- Victim accounts or administrative sessions could be compromised
- Stored content could be used for phishing or persistent defacement
General mitigation guidance
Mitigation generally focuses on enforcing authorization at the editing endpoint and treating all user-controlled HTML as untrusted. Common defensive patterns include applying allowlist-based HTML sanitization when rich content is required, using context-appropriate output encoding by default, and avoiding raw HTML rendering for fields that do not need it. Input trust can be reduced by limiting editable markup and separating trusted templates from user content. Least-privilege roles, narrowly scoped permissions, secure cookie attributes, and a restrictive Content Security Policy can reduce the consequences of a bypass or missed encoding path.
How teams detect issues like this
Detection approaches include static analysis for raw HTML rendering, unsafe template interpolation, missing output encoding, and authorization checks that are absent or broader than the intended role model. Code review should trace the before_html value from request handling through persistence and rendering, while testing should verify both stored payload handling and access control for low-privileged accounts. Policy enforcement can require approved sanitization libraries, encoded rendering helpers, and authorization tests for administrative content-management endpoints. Automated review tools may help identify suspicious sinks and untrusted data flows.

