diff --git a/vendor/magento/module-catalog/Model/ResourceModel/Category.php b/vendor/magento/module-catalog/Model/ResourceModel/Category.php
index f56fecb8dc5..fed2acc54df 100644
--- a/vendor/magento/module-catalog/Model/ResourceModel/Category.php
+++ b/vendor/magento/module-catalog/Model/ResourceModel/Category.php
@@ -1,7 +1,7 @@
 <?php
 /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
+ * Copyright 2015 Adobe
+ * All Rights Reserved.
  */
 
 /**
@@ -20,6 +20,7 @@ use Magento\Framework\App\ObjectManager;
 use Magento\Framework\DataObject;
 use Magento\Framework\EntityManager\EntityManager;
 use Magento\Framework\EntityManager\MetadataPool;
+use Magento\Framework\Exception\LocalizedException;
 use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
 
 /**
@@ -1026,6 +1027,29 @@ class Category extends AbstractResource implements ResetAfterRequestInterface
         return $this;
     }
 
+    /**
+     * @inheritDoc
+     */
+    public function validate($object)
+    {
+        $errors = parent::validate($object);
+        $currentId = $object->getId();
+        $newParentId = $object->getParentId();
+        if ($parentPath = $this->getCategoryPathById($newParentId)) {
+            $parentPathIds = explode("/", $parentPath);
+        } else {
+             $parentPathIds = [];
+        }
+
+        if ($currentId && !empty($parentPathIds) && in_array($currentId, $parentPathIds)) {
+            throw new LocalizedException(
+                __('A category cannot be assigned to one of its own descendants.')
+            );
+        }
+
+        return $errors;
+    }
+
     /**
      * Process positions of old parent category children and new parent category children.
      *
diff --git a/vendor/magento/module-catalog/i18n/en_US.csv b/vendor/magento/module-catalog/i18n/en_US.csv
index b9fdf6b4324..3aca0d24d9c 100644
--- a/vendor/magento/module-catalog/i18n/en_US.csv
+++ b/vendor/magento/module-catalog/i18n/en_US.csv
@@ -822,3 +822,4 @@ Details,Details
 "The url has invalid characters. Please correct and try again.","The url has invalid characters. Please correct and try again."
 "Restricted admin is allowed to perform actions with images or videos, only when the admin has rights to all websites which the product is assigned to.","Restricted admin is allowed to perform actions with images or videos, only when the admin has rights to all websites which the product is assigned to."
 "Synchronize website specific attributes values","Synchronize website specific attributes values"
+"A category cannot be assigned to one of its own descendants.","A category cannot be assigned to one of its own descendants."
