Thanks for your effort maintaining this library :)
In version 9.1 this method was added which cannot be configured safely to prevent XXE.
Regardless of the configured dtd bool, without control over the external-general-entities feature, external DTDs are evaluated leading to exploitation.
By my understanding of the library a user passing false to the dtd parameter would not want/expect external DTDs to be evaluated, therefore allowing the feature flag to be controlled by this method resolves the issue.
Thanks for your effort maintaining this library :)
In version 9.1 this method was added which cannot be configured safely to prevent XXE.
Regardless of the configured
dtd
bool, without control over theexternal-general-entities
feature, external DTDs are evaluated leading to exploitation.By my understanding of the library a user passing
false
to thedtd
parameter would not want/expect external DTDs to be evaluated, therefore allowing the feature flag to be controlled by this method resolves the issue.