You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/06/16 08:29:48 UTC
[PR] Backport #12256: Centralize XXE hardening for StAX XML parsers [maven]
gnodet opened a new pull request, #12269:
URL: https://github.com/apache/maven/pull/12269
Backport of #12256 to 4.0.x — centralizes XXE hardening into `XmlService.newXMLInputFactory()`.
All `XMLInputFactory.newFactory()` call sites now go through this hardened factory method, which disables DTD support and external entity resolution to prevent XXE attacks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Backport #12256: Centralize XXE hardening for StAX XML parsers [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #12269:
URL: https://github.com/apache/maven/pull/12269
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Backport #12256: Centralize XXE hardening for StAX XML parsers [maven]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on code in PR #12269:
URL: https://github.com/apache/maven/pull/12269#discussion_r3419228961
##########
api/maven-api-xml/src/main/java/org/apache/maven/api/xml/XmlService.java:
##########
@@ -103,6 +104,20 @@ public abstract class XmlService {
*/
public static final String KEYS_COMBINATION_MODE_ATTRIBUTE = "combine.keys";
+ /**
+ * Creates a new {@link XMLInputFactory} hardened against XXE attacks.
+ * The returned factory has DTD support and external entity resolution disabled.
+ *
+ * @return a hardened XMLInputFactory
+ * @since 4.1.0
Review Comment:
since 4.0.0-rc-6?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Backport #12256: Centralize XXE hardening for StAX XML parsers [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #12269:
URL: https://github.com/apache/maven/pull/12269#discussion_r3419245989
##########
api/maven-api-xml/src/main/java/org/apache/maven/api/xml/XmlService.java:
##########
@@ -103,6 +104,20 @@ public abstract class XmlService {
*/
public static final String KEYS_COMBINATION_MODE_ATTRIBUTE = "combine.keys";
+ /**
+ * Creates a new {@link XMLInputFactory} hardened against XXE attacks.
+ * The returned factory has DTD support and external entity resolution disabled.
+ *
+ * @return a hardened XMLInputFactory
+ * @since 4.1.0
Review Comment:
Fixed — changed to `@since 4.0.0-rc-6`. Also created #12270 to fix it on master.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org