The function Token& Scanner::peek in scanner.cpp in yaml-cpp 0.5.3 and earlier allows remote attackers to cause a denial of service (assertion failure and application exit) via a !2 string.
The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Yaml-cpp | Yaml-cpp_project | * | 0.5.3 (including) |
| Yaml-cpp | Ubuntu | artful | * |
| Yaml-cpp | Ubuntu | bionic | * |
| Yaml-cpp | Ubuntu | cosmic | * |
| Yaml-cpp | Ubuntu | disco | * |
| Yaml-cpp | Ubuntu | eoan | * |
| Yaml-cpp | Ubuntu | esm-apps/bionic | * |
| Yaml-cpp | Ubuntu | esm-apps/xenial | * |
| Yaml-cpp | Ubuntu | esm-infra-legacy/trusty | * |
| Yaml-cpp | Ubuntu | esm-infra/focal | * |
| Yaml-cpp | Ubuntu | focal | * |
| Yaml-cpp | Ubuntu | trusty | * |
| Yaml-cpp | Ubuntu | trusty/esm | * |
| Yaml-cpp | Ubuntu | upstream | * |
| Yaml-cpp | Ubuntu | xenial | * |
| Yaml-cpp | Ubuntu | zesty | * |
| Yaml-cpp0.3 | Ubuntu | artful | * |
| Yaml-cpp0.3 | Ubuntu | bionic | * |
| Yaml-cpp0.3 | Ubuntu | cosmic | * |
| Yaml-cpp0.3 | Ubuntu | esm-apps/bionic | * |
| Yaml-cpp0.3 | Ubuntu | esm-apps/xenial | * |
| Yaml-cpp0.3 | Ubuntu | trusty | * |
| Yaml-cpp0.3 | Ubuntu | xenial | * |
| Yaml-cpp0.3 | Ubuntu | zesty | * |
While assertion is good for catching logic errors and reducing the chances of reaching more serious vulnerability conditions, it can still lead to a denial of service. For example, if a server handles multiple simultaneous connections, and an assert() occurs in one single connection that causes all other connections to be dropped, this is a reachable assertion that leads to a denial of service.