|
The JarVisitorFactory is in normal situations called by the Hibernate ORM bootstrap. I think the user supplied input you mention come from:
-
the classpath variable (in SE mode)
-
the JAR paths provided by the user in persistence.xml (in SE mode)
-
a list of URLs provided by the container in EE mode (PersistenceUnitInfo)
So an attacker would need to access the application configuration and be able to manipulate the classpath to be of any effectiveness. If such manipulations were possible, then there are tons of additional options like sticking your own attacker custom classes and have them executed. In other words, the input provided to JarVisitorFactory is not impacted by what an application user would input.
A few other considerations regarding the execution environment. In SE mode, Hibernate does not know what is off-limit file wise nor has the notion of webroot or anything approaching. I don't think we can put the onus of security on Hibernate ORM here. In EE mode, the app server is responsible to only show the resources that the Hibernate ORM library is allowed to see. URLs to /etc/passwd and other goodies like that should not be allowed (that might require a security manager).
So I would consider it a false positive.
|