Spring Security OAuth RCE (CVE-2016-4977)
通过poc可以看出,poc的目录在/oauth/authorize,可以通过requestmapping的值来找到该方法。
而在我们传入数据以后,还会经过一个/oauth/error目录,这个目录在WhitelabelErrorEndpoint类的handleError方法。该方法通过创建model,获取错误的值以后进入到OAuth2Exception的getSummary方法获取详细的错误信息后将其返回,使用视图解析和SpelView来渲染。等于说把我们传入的数据原封不动的返回了
来到SpelView类,该类的构造方法通过PropertyPlaceholderHelper来取${}里的值然后到replacePlaceholders方法里再取值,最后通过SpelExpressionParser类的parseExpression方法执行。