diff --git a/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
index 1402b5f..e31bfe6 100644
--- a/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
+++ b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
@@ -767,21 +767,28 @@ class InlineParagraphsWidget extends WidgetBase {
 
       // Checking if default_type is not none and if is allowed.
       if ($default_type) {
-        // Place the default paragraph.
-        $target_type = $this->getFieldSetting('target_type');
-        $paragraphs_entity = $entity_type_manager->getStorage($target_type)->create([
-          'type' => $default_type,
-        ]);
-        $field_state['selected_bundle'] = $default_type;
-        $display = EntityFormDisplay::collectRenderDisplay($paragraphs_entity, $this->getSetting('form_display_mode'));
-        $field_state['paragraphs'][0] = [
-          'entity' => $paragraphs_entity,
-          'display' => $display,
-          'mode' => 'edit',
-          'original_delta' => 1
-        ];
-        $max = 1;
-        $field_state['items_count'] = $max;
+        // Avoid crashing with wrong configuration for default type.
+        if (count($this->fieldParents) < 13) {
+          // Place the default paragraph.
+          $target_type = $this->getFieldSetting('target_type');
+          $paragraphs_entity = $entity_type_manager->getStorage($target_type)->create([
+            'type' => $default_type,
+          ]);
+          $field_state['selected_bundle'] = $default_type;
+          $display = EntityFormDisplay::collectRenderDisplay($paragraphs_entity, $this->getSetting('form_display_mode'));
+          $field_state['paragraphs'][0] = [
+            'entity' => $paragraphs_entity,
+            'display' => $display,
+            'mode' => 'edit',
+            'original_delta' => 1
+          ];
+          $max = 1;
+          $field_state['items_count'] = $max;
+        }
+        else {
+          drupal_set_message('Nesting level is too deep.', 'warning');
+        }
+
       }
     }
 
diff --git a/src/Plugin/Field/FieldWidget/ParagraphsWidget.php b/src/Plugin/Field/FieldWidget/ParagraphsWidget.php
index 17a5b57..1c5893c 100644
--- a/src/Plugin/Field/FieldWidget/ParagraphsWidget.php
+++ b/src/Plugin/Field/FieldWidget/ParagraphsWidget.php
@@ -757,21 +757,27 @@ class ParagraphsWidget extends WidgetBase {
 
       // Checking if default_type is not none and if is allowed.
       if ($default_type) {
-        // Place the default paragraph.
-        $target_type = $this->getFieldSetting('target_type');
-        $paragraphs_entity = $entity_type_manager->getStorage($target_type)->create([
-          'type' => $default_type,
-        ]);
-        $field_state['selected_bundle'] = $default_type;
-        $display = EntityFormDisplay::collectRenderDisplay($paragraphs_entity, $this->getSetting('form_display_mode'));
-        $field_state['paragraphs'][0] = [
-          'entity' => $paragraphs_entity,
-          'display' => $display,
-          'mode' => 'edit',
-          'original_delta' => 1
-        ];
-        $max = 1;
-        $field_state['items_count'] = $max;
+        // Avoid crashing with wrong configuration for default type.
+        if (count($this->fieldParents) < 13) {
+          // Place the default paragraph.
+          $target_type = $this->getFieldSetting('target_type');
+          $paragraphs_entity = $entity_type_manager->getStorage($target_type)->create([
+            'type' => $default_type,
+          ]);
+          $field_state['selected_bundle'] = $default_type;
+          $display = EntityFormDisplay::collectRenderDisplay($paragraphs_entity, $this->getSetting('form_display_mode'));
+          $field_state['paragraphs'][0] = [
+            'entity' => $paragraphs_entity,
+            'display' => $display,
+            'mode' => 'edit',
+            'original_delta' => 1
+          ];
+          $max = 1;
+          $field_state['items_count'] = $max;
+        }
+        else {
+          drupal_set_message('Nesting level is too deep.', 'warning');
+        }
       }
     }
 
diff --git a/src/Tests/Classic/ParagraphsWidgetButtonsTest.php b/src/Tests/Classic/ParagraphsWidgetButtonsTest.php
index 7f5789e..a09de39 100644
--- a/src/Tests/Classic/ParagraphsWidgetButtonsTest.php
+++ b/src/Tests/Classic/ParagraphsWidgetButtonsTest.php
@@ -109,4 +109,68 @@ class ParagraphsWidgetButtonsTest extends ParagraphsTestBase {
     $this->assertNoText($restore_text);
   }
 
+  /**
+   * Test recursive loop adding default paragraph types.
+   *
+   * Here we are checking two cases:
+   *
+   * Trying to add content type which has nested paragraph type as default,
+   * while the default nested paragraph that is being added already has
+   * nested paragraph set as default. We are checking if we are not
+   * crashing after infinite loop of default paragraphs.
+   *
+   * Trying to add content type which has new nested paragraph type as default,
+   * while the new default nested paragraph that is being added already has
+   * nested paragraph set as default. We are checking if we are not
+   * crashing after infinite loop of default paragraphs.
+   */
+  public function testAvoidingCrashingWithWrongConfiguration() {
+    $this->addParagraphedContentType('paragraphed_test', 'field_paragraphs');
+
+    $this->loginAsAdmin([
+      'create paragraphed_test content',
+      'edit any paragraphed_test content',
+    ]);
+
+    // Add a Paragraph type.
+    $this->addParagraphsType('text');
+    $this->addParagraphsType('nested_paragraph');
+    static::fieldUIAddNewField('admin/structure/paragraphs_type/nested_paragraph', 'nested', 'Nested', 'field_ui:entity_reference_revisions:paragraph', [
+      'settings[target_type]' => 'paragraph',
+      'cardinality' => '-1',
+    ], []);
+    $this->setDefaultParagraphType('paragraphed_test', 'field_paragraphs', 'field_paragraphs_settings_edit', 'nested_paragraph');
+    $this->drupalGet('admin/structure/paragraphs_type/nested_paragraph/fields/paragraph.nested_paragraph.field_nested');
+    $edit = [
+      'settings[handler_settings][target_bundles_drag_drop][nested_paragraph][enabled]' => '1',
+    ];
+    $this->drupalPostForm(NULL, $edit, 'Save settings');
+    $this->assertText('Saved Nested configuration.');
+
+    // Checks that we are not crashing with wrong configuration for default
+    // paragraph.
+    $this->drupalGet('node/add/paragraphed_test');
+    $this->assertText('Nesting level is too deep.');
+
+    $this->addParagraphsType('new_nested_paragraph');
+    static::fieldUIAddNewField('admin/structure/paragraphs_type/new_nested_paragraph', 'new_nested', 'New Nested', 'field_ui:entity_reference_revisions:paragraph', [
+      'settings[target_type]' => 'paragraph',
+      'cardinality' => '-1',
+    ], []);
+
+    // Set nested paragraph as default for new_nested paragraph.
+    $this->drupalGet('admin/structure/paragraphs_type/new_nested_paragraph/fields/paragraph.new_nested_paragraph.field_new_nested');
+    $edit = [
+      'settings[handler_settings][target_bundles_drag_drop][nested_paragraph][enabled]' => '1',
+    ];
+    $this->drupalPostForm(NULL, $edit, 'Save settings');
+    $this->assertText('Saved New Nested configuration.');
+    $this->setDefaultParagraphType('paragraphed_test', 'field_paragraphs', 'field_paragraphs_settings_edit', 'new_nested_paragraph');
+
+    // Checks that we are not crashing with wrong configuration for default
+    // paragraph.
+    $this->drupalGet('node/add/paragraphed_test');
+    $this->assertText('Nesting level is too deep.');
+  }
+
 }
diff --git a/src/Tests/Experimental/ParagraphsExperimentalWidgetButtonsTest.php b/src/Tests/Experimental/ParagraphsExperimentalWidgetButtonsTest.php
index 08014d5..c424172 100644
--- a/src/Tests/Experimental/ParagraphsExperimentalWidgetButtonsTest.php
+++ b/src/Tests/Experimental/ParagraphsExperimentalWidgetButtonsTest.php
@@ -162,4 +162,69 @@ class ParagraphsExperimentalWidgetButtonsTest extends ParagraphsExperimentalTest
     $this->assertFieldByName('field_paragraphs_2_collapse');
     $this->assertFieldByName('field_paragraphs_2_subform_field_nested_0_collapse');
   }
+
+  /**
+   * Test recursive loop adding default paragraph types.
+   *
+   * Here we are checking two cases:
+   *
+   * Trying to add content type which has nested paragraph type as default,
+   * while the default nested paragraph that is being added already has
+   * nested paragraph set as default. We are checking if we are not
+   * crashing after infinite loop of default paragraphs.
+   *
+   * Trying to add content type which has new nested paragraph type as default,
+   * while the new default nested paragraph that is being added already has
+   * nested paragraph set as default. We are checking if we are not
+   * crashing after infinite loop of default paragraphs.
+   */
+  public function testAvoidingCrashingWithWrongConfiguration() {
+    $this->addParagraphedContentType('paragraphed_test', 'field_paragraphs');
+
+    $this->loginAsAdmin([
+      'create paragraphed_test content',
+      'edit any paragraphed_test content',
+    ]);
+
+    // Add a Paragraph type.
+    $this->addParagraphsType('text');
+    $this->addParagraphsType('nested_paragraph');
+    static::fieldUIAddNewField('admin/structure/paragraphs_type/nested_paragraph', 'nested', 'Nested', 'field_ui:entity_reference_revisions:paragraph', [
+      'settings[target_type]' => 'paragraph',
+      'cardinality' => '-1',
+    ], []);
+    $this->setDefaultParagraphType('paragraphed_test', 'field_paragraphs', 'field_paragraphs_settings_edit', 'nested_paragraph');
+    $this->drupalGet('admin/structure/paragraphs_type/nested_paragraph/fields/paragraph.nested_paragraph.field_nested');
+    $edit = [
+      'settings[handler_settings][target_bundles_drag_drop][nested_paragraph][enabled]' => '1',
+    ];
+    $this->drupalPostForm(NULL, $edit, 'Save settings');
+    $this->assertText('Saved Nested configuration.');
+
+    // Checks that we are not crashing with wrong configuration for default
+    // paragraph.
+    $this->drupalGet('node/add/paragraphed_test');
+    $this->assertText('Nesting level is too deep.');
+
+    $this->addParagraphsType('new_nested_paragraph');
+    static::fieldUIAddNewField('admin/structure/paragraphs_type/new_nested_paragraph', 'new_nested', 'New Nested', 'field_ui:entity_reference_revisions:paragraph', [
+      'settings[target_type]' => 'paragraph',
+      'cardinality' => '-1',
+    ], []);
+
+    // Set nested paragraph as default for new_nested paragraph.
+    $this->drupalGet('admin/structure/paragraphs_type/new_nested_paragraph/fields/paragraph.new_nested_paragraph.field_new_nested');
+    $edit = [
+      'settings[handler_settings][target_bundles_drag_drop][nested_paragraph][enabled]' => '1',
+    ];
+    $this->drupalPostForm(NULL, $edit, 'Save settings');
+    $this->assertText('Saved New Nested configuration.');
+    $this->setDefaultParagraphType('paragraphed_test', 'field_paragraphs', 'field_paragraphs_settings_edit', 'new_nested_paragraph');
+
+    // Checks that we are not crashing with wrong configuration for default
+    // paragraph.
+    $this->drupalGet('node/add/paragraphed_test');
+    $this->assertText('Nesting level is too deep.');
+  }
+
 }
