The vulnerability, CVE-2022-26134, is a critical OGNL injection flaw in Atlassian Confluence. The root cause lies within the XWork/WebWork web framework, a dependency of Confluence. The vulnerability is triggered when an attacker sends a specially crafted HTTP request with a malicious OGNL expression embedded in the URL's namespace.
The core of the vulnerability is that the framework evaluates the namespace from the URL as an OGNL expression. This behavior is present in the com.opensymphony.xwork.ActionChainResult.execute method. This method takes the namespace attribute of an ActionChainResult and passes it to com.opensymphony.xwork.util.TextParseUtil.translateVariables for OGNL evaluation. An unauthenticated attacker can craft a URL that causes the framework to use the malicious namespace, leading to remote code execution.
The mitigation provided by Atlassian involves replacing the vulnerable xwork and webwork JAR files with patched versions. The patch introduces a com.atlassian.confluence.setup.webwork.CachedConfigurationProvider class, which suggests that the fix involves changes to how action configurations are loaded and cached, likely to disable or sanitize OGNL evaluation for namespaces.
During an exploit, a runtime profiler would show a call stack including the entry point of the request (likely com.opensymphony.webwork.dispatcher.ServletDispatcher), leading to the action processing logic, and culminating in the call to com.opensymphony.xwork.ActionChainResult.execute, which in turn calls com.opensymphony.xwork.util.TextParseUtil.translateVariables to execute the malicious OGNL payload.