Fix polynomial regular expression vulnerability in XML encoding detection by Copilot · Pull Request #68 · codehaus-plexus/plexus-xml

@slachiewicz

Changed the regex pattern from .* to .*? to use non-greedy matching,
preventing catastrophic backtracking on malicious input.

Added test case to validate the fix with various edge cases.

Co-authored-by: slachiewicz <6705942+slachiewicz@users.noreply.github.com>

Copilot AI changed the title [WIP] Fix code scanning alert for polynomial regex on uncontrolled data Fix polynomial regular expression vulnerability in XML encoding detection

Oct 10, 2025

@slachiewicz slachiewicz deleted the copilot/fix-polynomial-regex-issue branch

October 26, 2025 07:38