Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make XmlReaderSettings globally configurable #264

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

MarvinPogoda
Copy link
Contributor

This is a short term workaround to remove a possible attack surface for XXE-Attacks mentioned in #262 .

@paulushub
Copy link
Contributor

It is a good idea, but only used in SharpVectorModel/DocumentStructure/SvgDocument.cs. So, it can safely live in that namespace, there is no need for a separate namespace. This could even be part of SvgDocument class, right?

@MarvinPogoda
Copy link
Contributor Author

MarvinPogoda commented Sep 27, 2023

It is considerable to always deactivate dtdprocessing by default as suggested here:

Short version

More information

Package versions that use dtd-processing should be probably be marked as vulnerable.

@paulushub paulushub self-requested a review September 27, 2023 13:31
@paulushub
Copy link
Contributor

paulushub commented Sep 27, 2023

Package versions that use dtd-processing should be probably be marked as vulnerable.

We can add a custom DTD resolver, and turn off entity resolutions to external remote documents by default.
SVG documents do use the entities.

@paulushub paulushub merged commit 404fe93 into ElinamLLC:master Sep 27, 2023
@MarvinPogoda
Copy link
Contributor Author

Is it possible to get a published nuget version, that includes this workaround?

@paulushub
Copy link
Contributor

Is it possible to get a published nuget version, that includes this workaround?

Let's make it Monday. Also hoping to find time and fix the issue this weekend.

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.

None yet

2 participants