Inject FileDisclosureSpringFramework

The `org.springframework.web.servlet.ModelAndView` class may potentially allow access to restricted files if called with user-supplied input. The ModelAndView class looks up a view by name to resolve a `.jsp` file. If this view name comes from user-supplied input, it could be abused to attempt to return a JSP view that the user should not have access to. Use

IndexedPublic repositoryHighHigh confidenceVerifiedMITJava
greprules fetch gitlab-sast-java-inject-rule-filedisclosurespringframework --engine opengrep

Description

The `org.springframework.web.servlet.ModelAndView` class may potentially allow access to restricted files if called with user-supplied input. The ModelAndView class looks up a view by name to resolve a `.jsp` file. If this view name comes from user-supplied input, it could be abused to attempt to return a JSP view that the user should not have access to. Use