Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5877

XML External Entity Injections

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Incomplete
    • 1.7.6
    • None
    • jaxws
    • Important

    Description

      XML parser configured in ConvertUtils.java:225 does not prevent nor limit external entities resolution. This can expose the parser to an XML External Entities attack.

      Proposed fix: Enable where TransformerFactory is used always the secure processing feature:

      	public static TransformerFactory createTransformerFactory() {
      		TransformerFactory factory = TransformerFactory.newInstance();
      		try {
      			factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
      		}
      		catch (TransformerConfigurationException e) {
      			throw new IllegalStateException(e);
      		}
      		return factory;
      	}
      

      Also in XSLTTemplateProcessor.java:147 (XSLT Injection) and other locations where this and DocumentBuilderFactory is handled wrong. See attached screenshots.

      Attachments

        1. xxe2.png
          32 kB
          Donald Kwakkel
        2. xxe1.png
          74 kB
          Donald Kwakkel

        Activity

          People

            Unassigned Unassigned
            dkwakkel Donald Kwakkel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: