How to patch your Drupal 8 regarding SA-CORE-2018-004
Check if your site doesn't have SA-CORE-2018-002 security update
If not please follow this manual How to patch your Drupal 8 regarding SA-CORE-2018-002
All changes in here is based on original patch for Drupal 8.5.2
To run SA-CORE-2018-004 update, execute the following command:
cd /drupal/root/folder/
curl https://gist.githubusercontent.com/stanbellcom/23f90da58c55a41c914364ce8117317f/raw/3d4e6587a43831b90aa930540b89fca28b494b8b/SA-CORE-2018-004-D8-partial.patch | patch -p1