Étapes de la reproduction
This vulnerability can convert safe <option> tags that are surrounded by various other tags (particularly the <select> tag) into unsafe ones, thereby opening the possibility of a Cross-Site Scripting (XSS) attack. The vulnerability is present in versions of the library prior to 1.8.0, specifically in the jqLite library.
Aborder la question
Les clients qui utilisent des versions d'AngularJS antérieures à la version 1.8.0 doivent procéder à une mise à jour immédiate.
Ce correctif contient un changement qui brise la compatibilité ascendante. Une nouvelle méthode qui restaure l'ancien comportement peut être trouvée avec UNSAFE_restoreLegacyJqLiteXHTMLReplacement. Si vous choisissez d'utiliser cette méthode rétrocompatible comme mesure temporaire, prévoyez de la remplacer dès que possible.
Apprentissage et prévention
Although there are many ways in which an XSS attack can occur that are within the developer’s control, in this case, the problem was in the method that was used to help sanitize the code. The original code used in the library was able to take already-sanitized code and turn it into unsanitized code. Sanitized, in this case, means that the code had already been “escaped.” Escaping is the process of converting risky characters such as < to safer versions (< in the case). Since it’s not possible to know the order in which various sanitization functions are executed, this improper transformation could have occurred last—thereby rendering the code insecure.
Conclusion
Le correctif décrit dans cette vulnérabilité est présent dans la version 1.8.0 et est également disponible immédiatement pour les clients de HeroDevs AngularJS Never-Ending Support qui sont encore sur Angular 1.5. Si vous souhaitez bénéficier d'un support pour éviter des attaques potentiellement coûteuses, contactez HeroDevs [TODO : insérer un lien] dès aujourd'hui.
Si vous souhaitez bénéficier de la tranquillité d'esprit que procure un abonnement à l'assistance sans fin de HeroDevs, contactez notre équipe de vente dès aujourd'hui.
Ressources
Entrée NIST 2020-7676
Soyez alerté chaque fois qu'une nouvelle vulnérabilité est corrigée dans les logiciels open source que nous soutenons.