Index: src/wp-includes/canonical.php
===================================================================
--- src/wp-includes/canonical.php	(revision 49555)
+++ src/wp-includes/canonical.php	(working copy)
@@ -27,6 +27,7 @@
  * or query in an attempt to figure the correct page to go to.
  *
  * @since 2.3.0
+ * @since 5.6.0 checks comment page count to limit pagination.
  *
  * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
  * @global bool       $is_IIS
@@ -490,8 +491,14 @@
 				&& ( 'newest' === $default_comments_page && $cpage > 0
 					|| 'newest' !== $default_comments_page && $cpage > 1 )
 			) {
-				$addl_path  = ( ! empty( $addl_path ) ? trailingslashit( $addl_path ) : '' );
-				$addl_path .= user_trailingslashit( $wp_rewrite->comments_pagination_base . '-' . $cpage, 'commentpaged' );
+				// checks comment page count to limit pagination.
+				$per_page             = get_option( 'comments_per_page' );
+				// get the total number of pages for comments.
+				$comments_total_pages = ceil( ( $wp_query->post->comment_count ) / $per_page );
+				if ( $cpage <= $comments_total_pages ) {
+					$addl_path  = ( ! empty( $addl_path ) ? trailingslashit( $addl_path ) : '' );
+					$addl_path .= user_trailingslashit( $wp_rewrite->comments_pagination_base . '-' . $cpage, 'commentpaged' );
+				}
 
 				$redirect['query'] = remove_query_arg( 'cpage', $redirect['query'] );
 			}
Index: tests/phpunit/tests/link/wpGetCanonicalURL.php
===================================================================
--- tests/phpunit/tests/link/wpGetCanonicalURL.php	(revision 49555)
+++ tests/phpunit/tests/link/wpGetCanonicalURL.php	(working copy)
@@ -152,6 +152,27 @@
 	}
 
 	/**
+	 *  Limit pagination for comments.
+	 *
+	 *  @ticket 50233
+	 */
+	public function test_comments_limit_paged_with_plain_permalink_structure() {
+		$cpage = 5;
+
+		$link = add_query_arg(
+			array(
+				'cpage' => $cpage,
+				'foo'   => 'bar',
+			),
+			get_permalink( self::$post_id )
+		);
+
+		$this->go_to( $link );
+		$expected = get_permalink( self::$post_id ) . '#comments';
+		$this->assertSame( $expected, wp_get_canonical_url( self::$post_id ) );
+	}
+
+	/**
 	 * Filter callback for testing of filter usage.
 	 *
 	 * @return string
