Skip to content

A PDF that plays a rendition can still carry a script past the gate #2201

Description

@wintermeyer

A /Rendition action carries its script in /JS, a key the PDF gate's name scan does not look for, and behind a /Next chain pdfinfo does not report it either — so both answerers are blind and the file is accepted and stored. Measured through the real upload path as a dictionary, as an array, through a page's /AA /O with no /OpenAction at all, and in the spec's canonical no-/OP form. Proof that it really is script: poppler answers JavaScript: yes for the identical dictionary reached directly, and the gate refuses that one.

Treat /JS and /Rendition as script-bearing names, or refuse any /Next outright, since poppler cannot vouch for what lies past it. Nobody notices today because uploads are admin-only, but this has to be closed before ATTACHMENT_UPLOADERS opens to members. Two neighbours belong in the same pass: an /AF file whose stream omits /Type /EmbeddedFile, and XFA scripts, both accepted and both only documented. And no test covers poppler's JavaScript vote at all — disabling it leaves all 46 attachment tests green, so half the defence is unguarded.

Where: Vutuv.Uploads.PdfGate.

An AI agent wrote this text in my name. I know that is problematic.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions