You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mass Assignment vulnerability exists in the REST API endpoint that allows authenticated users to inject arbitrary fields into time entries via the customfields parameter, bypassing business logic controls.
Details
The affected endpoint uses the JavaScript spread operator (...customfields) to merge user-controlled input directly into the database document. While customfields is validated as an Object type, there is no validation of which keys are permitted inside that object. This allows attackers to overwrite protected fields such as userId, hours, and state.
PoC
Create a user and generate an API token
Identify a valid project ID
Send a POST request to /timeentry/create/ with malicious customfields
Observe that protected fields are overwritten in the created time entry
Alternatively, apply the spread operator before protected fields to prevent overwriting:
constnewTimeCard={
...customfields,// Spread first
userId,// Protected fields after (cannot be overwritten)
projectId,
date,
hours,task: awaitemojify(task),}
The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified.
Learn more on MITRE.
Summary
Mass Assignment vulnerability exists in the REST API endpoint that allows authenticated users to inject arbitrary fields into time entries via the
customfieldsparameter, bypassing business logic controls.Details
The affected endpoint uses the JavaScript spread operator (
...customfields) to merge user-controlled input directly into the database document. Whilecustomfieldsis validated as an Object type, there is no validation of which keys are permitted inside that object. This allows attackers to overwrite protected fields such asuserId,hours, andstate.PoC
customfieldsoutput.mp4
Suggested Fix
Implement an allowlist for permitted custom field keys:
Alternatively, apply the spread operator before protected fields to prevent overwriting: