OpenCV through 4.14.0 and 5.0.0 through 5.1.0 Infinite Loop via YAMLParser::parse
- State
- Published
- Severity
- 6.8 Medium
- Published
- Nov 23, 2026
- Updated
- Nov 23, 2026
- Reserved
- Nov 23, 2026
Description
OpenCV through 4.14.0 and 5.0.0 through 5.1.0 contains an infinite loop vulnerability in YAMLParser::parse that allows attackers to cause denial of service via crafted YAML dash lines. Attackers can supply YAML files with a non-separator '-' line after the first document, opened through cv::FileStorage, to hang the thread at full CPU.
| Product | Versions |
|---|---|
| opencv opencv | 4.14.0 and earlier Affected5.0.0 through 5.1.0 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 6.8 Medium | VulnCheck | |
| 3.1 | 5.5 Medium | VulnCheck |
Weaknesses
- CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')
References
- https://github.com/opencv/opencv/pull/31041Issue TrackerPatch
- https://github.com/opencv/opencv/commit/ede3313ae7157662b6c038adf758ad409cfedf40Patch
- https://issues.oss-fuzz.com/issues/492921270Issue Tracker
- https://github.com/opencv/opencv/blob/4.14.0/modules/core/src/persistence_yml.cpp#L797-L825Technical Details
- https://github.com/opencv/opencv/blob/5.1.0/modules/core/src/persistence_yml.cpp#L820-L851Technical Details
- VulnCheck Advisory: OpenCV through 4.14.0 and 5.0.0 through 5.1.0 Infinite Loop via YAMLParser::parseThird-Party Advisory
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.