Absent Member.
Absent Member.
8431 views

Regarding the 'XML External Entity Injection' reported by Fortify on Java code

Hi,

 

I had HP Fortify report the 'XML External Entity Injection' on my Java code and I made the below fixes to address this.

 

  1. DocumentBuilderFactory.setFeature("http://xml.org/sax/features/external-general-entities", false);
  2. DocumentBuilderFactory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);

Note: DocumentBuilderFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING , true); is already set to prevent 'XML Entity Expansion'.

 

However, even after these changes the Fortify still reports the 'XML External Entity Injection' error.

 

Wanted to understand if the Fortify rules around the XEE detection is looking for some specific settings to be set on parser apart from the above.

 

Regards,

Harsha.

Labels (1)
Tags (1)
0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.