The vulnerability description explicitly mentions that the ManifestParser and AmazonS3 classes are vulnerable to XXE attacks due to improper XML parsing.
-
ManifestParser: The commit dab4f52d49a4638142027b916e31a5a470df7f03 patches the read method in org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java. Before the patch, this method initialized a SAXParserFactory and used it to create an XMLReader without disabling features that allow XXE (like external general entities, external parameter entities, and DOCTYPE declarations). The patch adds calls to setFeature on the SAXParserFactory instance to disable these dangerous features. The vulnerability report also includes a test case (testXXE in ManifestParserTest.java) that demonstrates the XXE by calling this read method with a malicious XML input.
-
AmazonS3: The commit c6fc3607079022e95b018b60c830b3da63bf6fef patches the list method in org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java. Similar to ManifestParser, this method used a SAXParserFactory to parse XML (likely S3 bucket listing responses) without properly securing it against XXE. The patch applies the same setFeature calls to the SAXParserFactory to prevent the processing of external entities and DOCTYPE declarations.
Both functions were vulnerable because they parsed XML input without configuring the XML parser to prevent XXE attacks. The patches directly address this by disabling the relevant features in the SAXParserFactory used within these methods. Therefore, these methods would be directly involved in processing the malicious XML if the vulnerability were exploited and would appear in a runtime profile.