CVE-2017-16790: Attacker can read all files content on the server
(updated )
When a form is submitted by the user, the request handler classes of the Form component merge POST data (known as the $_POST
array in plain PHP) and uploaded files data (known as the $_FILES
array in plain PHP) into one array. This big array forms the data that are then bound to the form. At this stage there is no difference anymore between submitted POST data and uploaded files. A user can send a crafted HTTP request where the value of a FileType
is sent as normal POST
data that could be interpreted as a locale file path on the server-side (for example, file:///etc/passwd
). If the application did not perform any additional checks about the value submitted to the FileType
, the contents of the given file on the server could have been exposed to the attacker.
References
Detect and mitigate CVE-2017-16790 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →