Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4348

ClassCastException in COSParser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.12
    • 2.0.13, 3.0.0 PDFBox
    • Parsing
    • None

    Description

      Fuzzing PDF loading with JQF triggered an ClassCastException.

      java.lang.ClassCastException: org.apache.pdfbox.cos.COSString cannot be cast to org.apache.pdfbox.cos.COSDictionary
      	at org.apache.pdfbox.pdfparser.COSParser.parseDictionaryRecursive(COSParser.java:2919)
      	at org.apache.pdfbox.pdfparser.COSParser.parseDictionaryRecursive(COSParser.java:2927)
      	at org.apache.pdfbox.pdfparser.COSParser.parseDictionaryRecursive(COSParser.java:2927)
      	at org.apache.pdfbox.pdfparser.COSParser.parseDictionaryRecursive(COSParser.java:2927)
      	at org.apache.pdfbox.pdfparser.COSParser.parseDictionaryRecursive(COSParser.java:2927)
      	at org.apache.pdfbox.pdfparser.COSParser.prepareDecryption(COSParser.java:2865)
      	at org.apache.pdfbox.pdfparser.COSParser.retrieveTrailer(COSParser.java:284)
      	at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:171)
      	at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:220)
      	at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1160)
      	at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1057)
          ...
      
      

      The Code used for fuzzing is

      PDDocument.load(inputStream)
      

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            rschimpf Robin Schimpf
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: