Security Advisory: Some users can execute script code beyond their authorizations
Date: 27. 02. 2024
Severity: 8.5 (High)
Affected versions: All midPoint versions prior to 4.4.8, 4.7.4, 4.8.2
Fixed in versions: 4.4.8, 4.7.4, 4.8.2
Description
If a user is authorized to submit raw XML/JSON/YAML object data to midPoint (typically, when adding or modifying an object), they can execute arbitrary script code provided as part of that data. The code is executed before the authorization check stops the operation.
Severity and Impact
This is High Severity Issue.
Exploitation of this issue requires the ability to submit XML/JSON/YAML data to midPoint. Normally, users are not able to do so. The exception is, e.g., when they are allowed to use the REST API or access the Repository Objects page.
Mitigation
Users of affected MidPoint versions are advised to upgrade their deployments to the latest maintenance releases.
In the meantime, they are advised to allow Repository Objects and/or REST access only to trusted users.
Note
As an additional security measure, the versions mentioned (4.4.8, 4.7.4, and 4.8.2) provide the ability to restrict REST users only to operations they are expected to invoke.
For example, if a user is expected to call only the "get object" operation via REST, now they can be given the specific http://midpoint.evolveum.com/xml/ns/public/security/authorization-rest-3#getObject
authorization, instead of http://midpoint.evolveum.com/xml/ns/public/security/authorization-rest-3#all
that was needed previously.
See also Service Authorizations.