
HumHub Community Edition 1.18.4-pl1 - Reflected XSS in Space membership request button rendering
7.2
High
Detected by

Fluid Attacks AI SAST Scanner
Disclosed by
Miguel Gómez
Summary
Full name
HumHub Community Edition 1.18.4-pl1 - Reflected XSS in Space membership request button rendering allowing authenticated session actions
Code name
State
Public
Release date
Affected product
HumHub
Vendor
HumHub
Affected version(s)
1.18.4
Fixed version(s)
1.18.5
Vulnerability name
Reflected cross-site scripting (XSS)
Vulnerability type
Remotely exploitable
Yes
CVSS v4.0 vector string
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:N/SC:L/SI:L/SA:N
CVSS v4.0 base score
7.2
Exploit available
Yes
CVE ID(s)
Description
HumHub Community Edition 1.18.4 contains a reflected cross-site scripting vulnerability in the Space membership-request workflow. An attacker can place attacker-controlled button configuration in the options query-string parameter of space/membership/request-membership-form, lure an authenticated non-member into submitting the legitimate membership request form, and cause the server to return JavaScript containing attacker-controlled code.
The vulnerable workflow treats request-supplied presentation options as trusted UI configuration. The options survive in a hidden form field, are decoded after the victim submits the form with a valid CSRF token, are merged into the membership button configuration, and are rendered into a JavaScript string without JavaScript-safe encoding.
Successful exploitation executes arbitrary JavaScript in the victim's HumHub origin. The payload is reflected rather than stored, but it executes in an authenticated session and can perform same-origin actions with the victim's permissions.
Vulnerability
Root Cause
Attacker-controlled options are accepted from GET
MembershipController::actionRequestMembershipForm()initializes the request form and assignsoptionsdirectly from the query string when rendering the modal:The model treats the options object as safe
RequestMembershipForm::rules()marks the attribute as safe:This allows the attacker to provide arbitrary JSON structure instead of a constrained, server-generated membership-button configuration.
The modal preserves the attacker-controlled value
The form view writes the value into a hidden input:
The final POST is legitimate from HumHub's perspective: the victim submits the normal modal form with a valid session-bound CSRF token.
The server decodes and trusts the hidden options after POST
After validation, the controller decodes the hidden value and passes it to
MembershipButton:JSON parsing reconstructs the attacker-controlled structure; it does not make string values safe for HTML or JavaScript contexts.
The options are merged into trusted button defaults
MembershipButton::getOptions()usesArrayHelper::merge():This lets the attacker override fields such as:
The overridden title is rendered as raw anchor content
After the membership request is created, the victim's membership status is
STATUS_APPLICANT, somembershipButton.phprenders the pending-membership button:Yii's HTML helper does not automatically encode tag content; callers must encode user-controlled content before passing it as anchor content.
The generated HTML is embedded into JavaScript without JS encoding
requestMembershipSave.phpinterpolates the complete button HTML into a single-quoted JavaScript literal:A payload containing a single quote terminates the literal and executes as JavaScript. Because the injection lands inside a script block that already has a valid HumHub CSP nonce, CSP does not prevent execution.
Impact
An attacker can execute arbitrary JavaScript in the browser of an authenticated HumHub user who opens the crafted membership-request link and submits the normal request form.
Potential impact includes:
Reading data available to the victim's HumHub session and same-origin JavaScript context.
Performing same-origin requests with the victim's privileges.
Modifying user or Space state available to the victim.
Escalating impact if the victim has administrative or Space-management privileges.
The payload is reflected and requires user interaction. It is not stored in the database through this path.
PoC
Preconditions
HumHub Community Edition 1.18.4 or 1.18.4-pl1.
The victim is authenticated.
The victim is not already a member of the target Space and does not already have a pending membership request.
The target Space is reachable by the victim and can display the membership-request modal. The reported scenario uses the Invite and request join policy.
The attacker can deliver a crafted URL to the victim. If the attacker wants to control the target Space, the attacker also needs an account with permission to create or administer such a Space.
Step 1 - Identify a target Space
Record the Space cguid from a normal Space URL or membership request URL.
The legitimate request form URL has this shape:
Step 2 - Craft the options payload
Use a JSON object that overrides the pending-membership button title:
URL-encode the JSON and construct the link:
Example:
Step 3 - Trigger execution
Deliver the crafted URL to the authenticated victim.
The victim opens the URL and sees the legitimate Request Membership modal.
The victim enters a normal message.
The victim clicks Send.
Expected result:
HumHub accepts the form submission with the victim's valid CSRF token.
HumHub creates the pending membership request.
The AJAX response renders the new pending-membership button inside
requestMembershipSave.php.The injected single quote breaks out of the
replaceWith()JavaScript string.alert('PWNED')executes in the victim's authenticated HumHub origin.
Evidence of Exploitation
Video of exploitation:
Static evidence:

Our security policy
We have reserved the ID CVE-2026-18756 to refer to this issue from now on.
System Information
Humhub
Version 1.18.4
Operating System: Any
References
GitHub Repository: https://github.com/humhub/humhub
Mitigation
An updated version of HumHub is available on the vendor page.
Credits
The vulnerability was discovered by Miguel Gomez from Fluid Attacks' Offensive Team using the AI SAST Scanner.
Timeline
Vulnerability discovered
Vendor contacted
Vendor replied
Vendor requested re-testing
Follow-up with vendor
Vendor confirmed
Vulnerability patched
Public disclosure
Does your application use this vulnerable software?
During our free trial, our tools assess your application, identify vulnerabilities, and provide recommendations for their remediation.














