Repository navigation
Fix/xxe xinclude detection - #3429
Richard Lundeen (richlundeen) merged 4 commits into
Conversation
Richard Lundeen (richlundeen)
left a comment
There was a problem hiding this comment.
This pattern is broader than XInclude. It matches an ordinary <include href="https://example.com/help.xml" /> with no XInclude namespace, and it also matches <xi:include data-href="https://example.com/help.xml" /> even though that element has no href attribute. Both now count as successful XXE output.
Please narrow the match and add these negative cases. If recognizing XInclude correctly needs substantially more XML parsing machinery, I would rather close this small extension than add that complexity to a regex scorer.
Reviewed with GitHub Copilot.
Require an exact href attribute and avoid matching ordinary include elements. Cover conventional xi prefixes and explicit default XInclude namespaces. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Thank you, Richard, and the PyRIT maintainers for reviewing this contribution, suggesting the refinement, and helping get it merged! I really appreciate the feedback and the time you put into maintaining PyRIT. This was a great learning experience, and I look forward to contributing more improvements to the project in the future. |
Description
Tests and Documentation
Summary
Adds XXE output detection for XML XInclude elements that reference external resources.
Changes
hrefvalues usingfile:,http:,https:, orftp:schemes.Testing
includeelements.Scope
This change addresses the XInclude detection gap discussed in #3324. It complements existing XXE-related coverage without changing unrelated detection behavior.