Description
Press button → Get flag
Attachments
https://bypass.ictf.iciaran.com/
https://cybersharing.net/s/86cdf770fa6d5ace34068765dea3a502
Writeup
$ curl 'https://bypass.ictf.iciaran.com/api/;/admin/flag'
Abuse the mismatch in how nginx normalises the path vs Spring when using the AntPathMatcher.
Specifically the handling of path segment parameters (matrix parameters).
Nginx does no transformations for semicolons in the path, so the deny block for /api/admin/flag is not hit and the request is proxied to the backend.
Tomcat (the servlet container used) normalises the path, /api/;/admin/flag → /api//admin/flag → /api/admin/flag.
With matching-strategy: ant_path_matcher, Spring uses HttpServletRequest.getServletPath() for route matching which returns Tomcat's normalized path /api/admin/flag, and successfully matches against the api route.
Flag
ictf{f0ll0w_th3_wh1t3_r4bb1t}