Java Security Review: Common High-Risk Sinks and Pitfalls in XML, Deserialization and Queries
A security article explains that the most dangerous Java vulnerabilities often hide in ordinary-looking code, where untrusted data flows into sensitive operations called sinks. It notes that default XML parsers in Java enable external entity resolution, exposing applications to file disclosure, server-side request forgery, and denial of service, and that the JDK version alone does not fix this. The author recommends explicitly disabling doctype declarations and external DTD and schema access, configuring these features before the builder is created. The piece also warns that native deserialization with ObjectInputStream and permissive polymorphic typing in Jackson can enable remote code execution, and advises restricting allowed classes with filters or validators. Finally, it highlights a subtle injection risk in dynamic sorting within Spring Data JPA, where unvalidated property names can bypass safeguards.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in