 core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php | 2 +-
 core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php          | 2 +-
 core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php          | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php b/core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php
index 2f1681c..d72e697 100644
--- a/core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php
+++ b/core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php
@@ -57,7 +57,7 @@ public function getContext() {
    */
   public function getCacheableMetadata() {
     $cacheable_metadata = new CacheableMetadata();
-    $tags = [];
+    $tags = ['user:' . $this->user->id()];
     foreach ($this->user->getRoles() as $rid) {
       $tags[] = "config:user.role.$rid";
     }
diff --git a/core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php b/core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php
index 1181634..3b16c77 100644
--- a/core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php
+++ b/core/lib/Drupal/Core/Cache/Context/UserRolesCacheContext.php
@@ -51,7 +51,7 @@ public function getContext($role = NULL) {
    * {@inheritdoc}
    */
   public function getCacheableMetadata($role = NULL) {
-    return new CacheableMetadata();
+    return (new CacheableMetadata())->setCacheTags(['user:' . $this->user->id()]);
   }
 
 }
diff --git a/core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php b/core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php
index d304bf7..673cb49 100644
--- a/core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php
+++ b/core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php
@@ -89,6 +89,8 @@ protected function checkNodeGrants($operation) {
   public function getCacheableMetadata($operation = NULL) {
     $cacheable_metadata = new CacheableMetadata();
 
+    $cacheable_metadata->setCacheTags(['user:' . $this->user->id()]);
+
     if (!\Drupal::moduleHandler()->getImplementations('node_grants')) {
       return $cacheable_metadata;
     }
