libxml2 20904-GITv2.9.4-16-g0741801 is vulnerable to a...
        
  High severity
        
          Unreviewed
      
        Published
          May 13, 2022 
          to the GitHub Advisory Database
          •
          Updated Apr 20, 2025 
      
  
Description
        Published by the National Vulnerability Database
      May 18, 2017 
    
  
        Published to the GitHub Advisory Database
      May 13, 2022 
    
  
        Last updated
      Apr 20, 2025 
    
  
libxml2 20904-GITv2.9.4-16-g0741801 is vulnerable to a stack-based buffer overflow. The function xmlSnprintfElementContent in valid.c is supposed to recursively dump the element content definition into a char buffer 'buf' of size 'size'. At the end of the routine, the function may strcat two more characters without checking whether the current strlen(buf) + 2 < size. This vulnerability causes programs that use libxml2, such as PHP, to crash.
References