BGP has been a very successful protocol and much of its success is the ability to incrementally deploy new features. However, those same mechanisms create gotchas when extensions leak beyond where they're supposed to be.
A document I've been working on for a while discussing the problem and some of the solutions is up for adoption in IETF. Please take a look at the document and consider contributing to the solution space if you work in BGP networking.
https://www.ietf.org/archive/id/draft-haas-idr-bgp-attribute-escape-04.html
BGP Attribute Escape
BGP-4 [RFC 4271] has been very successful in being extended over the years it has been deployed. A significant part of that success is due to its ability to incrementally add new features to its Path Attributes when they are marked "optional transitive". Implementations that are ignorant of a feature for an unknown Path Attribute that are so marked will propagate BGP routes with such attributes. Unfortunately, this blind propagation of unknown Path Attributes may happen for features that are intended to be used in a limited scope. When such Path Attributes inadvertently are carried beyond that scope, it can lead to things such as unintended disclosure of sensitive information, or cause improper routing. In their worst cases, such propagation may be for malformed Path Attributes and lead to BGP session resets or crashes. This document calls such inadvertent propagation of BGP Path Attributes, "attribute escape". This document further describes some of the scenarios that leads to this behavior and makes recommendations on practices that may limit its impact.




