A stack-based buffer overflow vulnerability exists in libxml2 versions before 2.12.10 and 2.13.x before 2.13.6 in the xmlSnprintfElements function within valid.c. Exploitation requires DTD validation of an untrusted document or DTD. This vulnerability is similar to CVE-2017-9047 and has a high severity rating with a CVSS score of 7.8.