Daily security quiz #14
Question for 2026-11-14. Read the code and pick the most serious security vulnerability.
This code reads an uploaded XML configuration file and returns the name as text/plain (using the default JDK parser). What is the most serious vulnerability?
DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = f.newDocumentBuilder();
Document doc = builder.parse(uploadedFile.getInputStream());
String name = doc.getElementsByTagName("name").item(0).getTextContent();
response.getWriter().write("Configuration name: " + name);