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

Limit maximum number of nesting levels for COSArrays/COSDictionaries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.27, 3.0.0 PDFBox
    • None
    • Parsing
    • None

    Description

      The PDFBox user Jay filed an issue with the attached pdf using security@apache.org

      It is a handcrafted pdf containing a COSArray with a lot of nesting levels which leads to a StackOverflowException.
      Theoretically there is no maximum nesting level for COSArrays or COSDictionaries but in the wild just a few number of levels may occur. Saying that, it makes sense to introduce a maximum number of nesting levels to avoid such exceptions

      Attachments

        1. 2023_StackOverFlowtest.pdf
          6 kB
          Andreas Lehmkühler

        Activity

          People

            Unassigned Unassigned
            lehmi Andreas Lehmkühler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: