Introduction
Layer7 API Gateway environments utilizing the OAuth Toolkit (OTK) may be vulnerable to a security flaw in the OpenID Connect Dynamic Client Registration feature. This vulnerability allows an attacker to provide an unvalidated jwks_uri parameter, potentially leading to Server-Side Request Forgery (SSRF) or Remote Code Execution (RCE).
Symptoms Active exploitation attempts may show unauthorized requests to OIDC endpoints. Real-time debug logs may capture malicious payloads in the jwks_uri field, such as encoded Redis commands: "jwks_uri": "http://####:7379/EVAL/redis.call('CONFIG','SET','dir','/etc/cron.d')..."
the following content was captured directly from real-time debug of the affected service and is provided unchanged for analysis.
Affected endpoints include:
/openid/connect/register/.well-known/openid-configuration/openid/connect/jwks.json
The vulnerability is caused by insufficient destination validation for the jwks_uri parameter during Dynamic Client Registration.
Fixed in release OTK 4.7.1 and higher. Use Download Solution Patches to download this release.
For users on earlier versions, apply the version-specific patch:
Workaround: If Dynamic Client Registration is not required, disable the following service endpoints on the Gateway:
/openid/connect/register/openid/connect/register/*