Skip to content

disable DTDs and external entities in KMIPInputStream#2315

Open
digi-scrypt wants to merge 1 commit into
bcgit:mainfrom
digi-scrypt:kmip-xxe-disable-dtd
Open

disable DTDs and external entities in KMIPInputStream#2315
digi-scrypt wants to merge 1 commit into
bcgit:mainfrom
digi-scrypt:kmip-xxe-disable-dtd

Conversation

@digi-scrypt

Copy link
Copy Markdown
  1. KMIPInputStream builds its XMLEventReader from a bare XMLInputFactory, so a DOCTYPE in a parsed KMIP message is honoured and external SYSTEM entities get resolved as parse() pulls events.
  2. a file:// or http:// entity then turns into a local file read or an outbound request from whichever side parses the message; aiming one at a missing path drops a "No such file or directory" straight out of the parse loop, which is the tell.
    Set SUPPORT_DTD=false (and external entities off as a backstop) on the factory before creating the reader. Messages without a doctype parse exactly as before.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant