diff --git a/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php
new file mode 100644
index 0000000..966cd41
--- /dev/null
+++ b/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php
@@ -0,0 +1,57 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\EventSubscriber\SpecialAttributesRouteSubscriber.
+ */
+
+namespace Drupal\Core\EventSubscriber;
+
+use Drupal\Component\Utility\String;
+use Drupal\Core\Routing\RouteBuildEvent;
+use Drupal\Core\Routing\RoutingEvents;
+use Symfony\Cmf\Component\Routing\RouteObjectInterface;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+
+/**
+ * Provides a route subscriber which checks for invalid pattern variables.
+ */
+class SpecialAttributesRouteSubscriber implements EventSubscriberInterface {
+
+  /**
+   * Checks for invalid pattern variables.
+   *
+   * @param \Drupal\Core\Routing\RouteBuildEvent $event
+   *   The event containing the build routes.
+   */
+  public function onRouteBuilding(RouteBuildEvent $event) {
+    $special_variables = array(
+      '_account',
+      'system_path',
+      '_maintenance',
+      '_legacy',
+      '_authentication_provider',
+      RouteObjectInterface::ROUTE_OBJECT,
+      RouteObjectInterface::ROUTE_NAME,
+      '_content',
+      '_form',
+    );
+
+    foreach ($event->getRouteCollection()->all() as $route) {
+      foreach ($route->compile()->getVariables() as $variable_name) {
+        if (in_array($variable_name, $special_variables)) {
+          throw new \InvalidArgumentException(String::format('Invalid route pattern variable: @variable', array('@variable' => $variable_name)));
+        }
+      }
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  static function getSubscribedEvents() {
+    $events[RoutingEvents::ALTER][] = 'onRouteBuilding';
+    return $events;
+  }
+
+}
