iTextPDF in iText 7 and up to (excluding 4.4.13.3) 7.1.17 allows command injection via a CompareTool filename that is mishandled on the gs (aka Ghostscript) command line in GhostscriptHelper.java.
{
"versions": [
{
"introduced": "7.0.0"
},
{
"fixed": "7.1.17"
}
]
}