#Kafka#OAuth#JWT#Security#Queuing

Kafka OAUTHBEARER: Why Your Broker Should Pin Issuer and Audience (CVE-2026-110952)

webhani·

If you authenticate Kafka clients with SASL/OAUTHBEARER, there is a configuration detail worth checking this week. CVE-2026-110952 is a moderate-severity issue in the broker's JWKS-backed token validator, published as part of a batch of Kafka advisories at the end of October. The pattern behind it is general: a token can be genuine and still not be meant for you.

The details below come from secondary sources (vulnerability databases and security write-ups). Check the official Apache Kafka CVE list for the authoritative version ranges before acting on them.

What the issue is

When a broker is configured with a JWKS endpoint, it verifies the JWT signature against the identity provider's published keys. Two further checks decide whether a signed token is acceptable for this broker:

  • Issuer (iss): who minted the token.
  • Audience (aud): who the token was minted for.

In the affected versions (reported as 3.1.0 up to, but not including, 4.4.0), the settings sasl.oauthbearer.expected.issuer and sasl.oauthbearer.expected.audience were optional. If you left them unset, the broker verified the signature but did not insist on a particular issuer or audience. A token from the same signing keys, but issued for a different application, could be accepted.

Whether that is exploitable depends on your identity provider. If one provider signs tokens for many applications (common in larger organisations), then a token legitimately issued to an unrelated internal service might authenticate against Kafka. That is a confused-deputy problem, not a broken signature.

How it differs from the earlier Kafka JWT advisory

Do not confuse this with the more severe, related issue CVE-2026-110985. That one concerns brokers with SASL/OAUTHBEARER but no JWKS endpoint configured, where no signature check happens at all and a forged token could impersonate any principal. It follows the earlier CVE-2026-33557, which we covered in an earlier post.

In short:

SituationRisk
No JWKS URL configuredSignatures not verified. Critical class of problem.
JWKS configured, issuer/audience unsetSignature verified, but tokens meant for other apps may be accepted.
JWKS configured, issuer and audience setIntended configuration.

What to do now

1. Set both properties on every broker using JWKS. This is the workaround for versions before 4.4.0:

# server.properties
sasl.enabled.mechanisms=OAUTHBEARER
sasl.oauthbearer.jwks.endpoint.url=https://idp.example.com/.well-known/jwks.json
sasl.oauthbearer.expected.issuer=https://idp.example.com/
sasl.oauthbearer.expected.audience=kafka-prod

Use an audience value that is unique to your Kafka cluster, and configure your identity provider so that only clients meant to use Kafka receive tokens carrying it. A shared audience such as a generic api defeats the purpose.

2. Plan the upgrade to 4.4.0. According to the reports, the fixed release refuses to start a JWKS-configured broker unless both values are set. That is a good default, but it means an upgrade with a missing property becomes a startup failure. Add the settings first, so the upgrade is uneventful.

3. Verify the JWKS endpoint is set. Check every broker, including ones in test and staging environments that might hold real data. A missing endpoint is the more serious case above.

4. Review principal mapping. Check how the token's subject or a custom claim becomes the Kafka principal, and make sure your ACLs do not grant broad access to principals derived from any valid token.

Checking from the client side

On the client you only need the token to carry the right audience. If your provider supports per-client audience configuration, request tokens like this in the OAuth client-credentials flow:

curl -s -X POST https://idp.example.com/oauth/token \
  -d grant_type=client_credentials \
  -d client_id="$CLIENT_ID" \
  -d client_secret="$CLIENT_SECRET" \
  -d audience=kafka-prod

The parameter name for the audience varies between providers (some use audience, others use resource or scope-based audiences), so follow your provider's documentation. After a broker change, a client with a token for another audience should fail authentication; test that explicitly rather than assuming it.

The general lesson

JWT validation has three independent questions: is the signature valid, is the token current, and is it meant for me. Libraries and brokers often make the third one optional to ease adoption, and then it is skipped in production. The same applies to your own APIs. If you validate JWTs in application code, require iss and aud explicitly:

import { jwtVerify, createRemoteJWKSet } from 'jose';
 
const jwks = createRemoteJWKSet(new URL('https://idp.example.com/.well-known/jwks.json'));
 
export async function verify(token: string) {
  const { payload } = await jwtVerify(token, jwks, {
    issuer: 'https://idp.example.com/',
    audience: 'orders-api',
  });
  return payload;
}

Our recommendation

Treat issuer and audience as required configuration in every OAuth-protected system you run, not optional hardening. For Kafka, set them today, upgrade to the fixed release on your normal change schedule, and add a test that a validly signed token for a different audience is rejected. If you manage RabbitMQ as well, review its OAuth 2 advisories at the same time; some of those involve credential exposure, where patching alone does not revoke a leaked secret.

webhani helps teams review authentication and messaging infrastructure; get in touch if you would like a second pair of eyes on yours.