Summary
Admidio has a stored cross-site scripting vulnerability in role names that are rendered without proper output encoding in a profile page attribute. A role administrator who can set a crafted role name may cause JavaScript to run when a full administrator views an affected profile, potentially enabling account privilege escalation.
Affected context
The issue affects Admidio versions 5.0.0 through versions before 5.0.18 in role-related profile rendering. It becomes risky when a role name can be controlled by a role administrator and is inserted into the data-message attribute in modules/profile/roles_functions.php without context-appropriate encoding. A full administrator viewing the affected profile may trigger the stored content.
Exploit preconditions
- Attack surface: Role-name input and the profile page that renders role data
- Required access: Ability to create or modify a role name, such as role-administrator access
- Trigger point: A full administrator views a profile containing the affected role
- Why exploitation is possible: Unencoded role-name content can break out of the intended attribute context and execute script in the viewer's browser
Why this happens
The underlying issue is improper neutralization of user-controlled input before it is included in HTML, mapping to CWE-79: Cross-Site Scripting. Specifically, role-name data is rendered in an HTML attribute without encoding appropriate to that context. Stored content can therefore be interpreted as markup or script rather than inert text.
Potential impact
- A script may execute in the context of an administrator's browser session.
- An attacker could steal or misuse CSRF tokens accessible to that session.
- The attacker could potentially perform administrative actions, including assigning themselves the Administrator role.
- Other account or application data may be exposed or modified, depending on the victim's permissions.
General mitigation guidance
Defensive approaches include applying context-aware output encoding whenever role names are rendered in HTML attributes, and treating stored user-controlled values as untrusted even when entered by privileged users. Prefer safe templating practices that encode by default, avoid constructing HTML attributes through string concatenation, and validate inputs according to the intended role-name format. CSRF protections should use defenses beyond relying solely on token secrecy, and administrative actions should enforce authorization and least privilege server-side.
How teams detect issues like this
- Use static analysis to identify user-controlled values flowing into HTML attributes without context-aware encoding.
- Review templates and rendering code for string-built markup and unsafe attribute interpolation.
- Test role-name rendering with security-focused input cases and verify that values remain inert in the browser.
- Enforce code-review or CI policies requiring safe templating and output encoding for untrusted data.
- Monitor sensitive role and administrator changes for unexpected activity.

