Skip to content
Crypto Disclosed report Advanced

connect.8x8.com/api/v1: JWT Algorithm Confusion Vulnerability

The v1 API's JWT verifier did not enforce algorithm pinning, so it accepted HS256 tokens signed with the RSA public key used as an HMAC secret. An attacker who knew a target user's non-enumerable UUID and had an active server-side session for that user could forge tokens to read account information, though state-changing endpoints rejected them.

kyotozzx Follow

Originally disclosed on HackerOne

Bounty$1,337 High 7.7 View original
  • Triaged in 5 days
  • Fixed in 11 days
  • Paid in 10 days
  • Disclosed after 38 days

Summary by the program

@kyotozzx reported a JWT algorithm confusion vulnerability in the v1 API of connect.8x8.com. The JWT verifier did not enforce algorithm pinning and would accept HS256 tokens signed with the RSA public key used as an HMAC secret.

Exploitation required knowledge of a target user's non-enumerable UUID and an active server-side session for that user. Under these conditions, forged tokens were accepted by v1 read endpoints for account information retrieval. All state-changing endpoints independently rejected forged tokens, limiting impact to read-only access without privilege persistence or account takeover.

Remediation:

The v1 API verifier now enforces RS256 algorithm pinning, rejecting any tokens using alternative signature algorithms. The fix has been deployed to production and verified effective.

We thank @kyotozzx for the thorough analysis and detailed proof of concept.

The original report as published on HackerOne, by kyotozzx. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

connect.8x8.com exposes a v1 API whose endpoints authenticate callers with JSON Web Tokens. The verifier behind that API is the subject of this report: it checked token signatures but did not pin the signing algorithm, so it would accept tokens signed with an algorithm other than the one the issuer intended.

The program's summary describes the consequence directly: the verifier would accept HS256 tokens signed with the RSA public key used as an HMAC secret. That is the classic algorithm confusion pattern, where a value meant to be public (the RSA public key) is reused as a symmetric secret.

Setup

The report does not describe the researcher's tooling, accounts or environment. Two preconditions are stated explicitly and both matter for judging severity:

  1. Knowledge of a target user's UUID, which the program describes as non-enumerable.
  2. An active server-side session for that user.

Without both, the forged token does not get the attacker anywhere.

Finding it

The verifier did not enforce algorithm pinning. In a correctly pinned implementation the server decides up front that tokens must be RS256 and rejects anything else before touching the key material. Here, a token declaring HS256 was verified using the RSA public key as the HMAC secret. Since the public key is, by definition, public, an attacker who can obtain it can compute a valid HS256 signature over any claims they like.

Exploitation

Step 1: Obtain the RSA public key

The report does not show how the public key was retrieved. What matters is that it is public material, so obtaining it is not the barrier.

Step 2: Forge an HS256 token

With the public key in hand, the attacker signs a token using HS256, treating the public key bytes as the HMAC secret, and sets the claims to identify the victim user. The report does not include the token, the claim set or the signing command.

Step 3: Use the token against v1 read endpoints

Under the two preconditions above, the forged token was accepted by v1 read endpoints for account information retrieval. The report does not list the specific endpoint paths, parameters or response bodies.

Step 4: Attempt state-changing endpoints

Every state-changing endpoint independently rejected the forged tokens. This is the key limit on the finding: the confusion bug bought read access only, with no privilege persistence and no account takeover.

Root cause

The verifier did not pin the algorithm. It derived the verification method from the token's own alg header instead of enforcing RS256, so an HS256 token caused the RSA public key to be used as an HMAC secret. Because that key is public, the signature check passed for attacker-chosen claims.

The two preconditions, a non-enumerable UUID and a live server-side session, are what kept the bug from being trivially exploitable, and the independent rejection on state-changing endpoints is what kept the impact read-only.

Impact

An attacker who knows a target user's non-enumerable UUID and who has an active server-side session for that user could read account information through v1 read endpoints using a forged token. The program rates this high severity with a CVSS score of 7.7, and the bounty was 1337.00 USD.

The program is explicit about the ceiling: state-changing endpoints rejected the forged tokens, so there was no privilege persistence and no account takeover. The impact is read-only access under those conditions.

Fix

The v1 API verifier now enforces RS256 algorithm pinning and rejects any token using an alternative signature algorithm. The program states the fix has been deployed to production and verified effective.

Variants to test

Hunting notes

On impact: the program accepted this because the researcher showed a working forged token being accepted by real read endpoints, and because the report was honest about the limits. The two preconditions and the rejection on state-changing endpoints are stated plainly, which lets the program rate the finding accurately rather than overstate it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 12 min read.

What happened, in plain words

A security researcher found a flaw in how one part of the 8x8 service checked the digital passes (tokens) that users present to prove who they are. The service is called connect.8x8.com, and it has an API, which is the part of a website that software talks to directly rather than a page you click in a browser. The API version in question is v1.

To prove who is calling, that API uses JSON Web Tokens, or JWTs. A JWT is a small signed piece of text that says "this is user X" and carries a signature so the server can check it was not tampered with. The server checks the signature with a key. There are two families of signing method: one uses a pair of keys (a private one to sign, a public one to check), and one uses a single shared secret for both signing and checking.

The bug was that the server did not fix in advance which method it would accept. It read the method from the token itself, and a token can claim any method it likes. So an attacker could take the server's public key, which is public by design, and use it as if it were the shared secret of the single-secret method. The server then happily checked the signature with that key and accepted a token the attacker had made up. This pattern is called algorithm confusion.

Two things made the bug hard to use. The attacker needed to know a target user's UUID, a long identifier the program says cannot be guessed or listed. And the attacker needed that user to have an active session on the server at the same time. With both in place, forged tokens were accepted by the read endpoints of v1, the ones that fetch account information. Every endpoint that changes something rejected the forged tokens on its own. So the impact was read-only: no lasting access, no takeover of an account.

The program rated it high severity, with a CVSS score of 7.7, and paid a bounty of 1337.00 USD. The fix was to make the v1 verifier insist on the RS256 method and reject anything else, and the program says that fix is live in production and confirmed to work.

Context

connect.8x8.com exposes a v1 API whose endpoints authenticate callers with JSON Web Tokens. The verifier behind that API is the subject of this report: it checked token signatures but did not pin the signing algorithm, so it would accept tokens signed with an algorithm other than the one the issuer intended.

The program's summary describes the consequence directly: the verifier would accept HS256 tokens signed with the RSA public key used as an HMAC secret. That is the classic algorithm confusion pattern, where a value meant to be public (the RSA public key) is reused as a symmetric secret.

A few of those words need unpacking before the rest makes sense.

An API is the set of addresses a program uses to ask a service for data or to tell it to do something. When you use a website, your browser is often calling an API behind the scenes. The v1 in the name is just a version label: the service keeps older versions running alongside newer ones, and this report is about the first version.

A JSON Web Token (JWT) is a compact string, usually three chunks of text separated by dots, that a server hands out after you log in. It carries claims, which are statements such as "this token belongs to user X" and "it expires at time Y". The last chunk is a signature: a mathematical stamp that lets the server check the token was issued by it and not edited on the way. Think of a wax seal on an envelope: the contents are readable, but the seal shows whether anyone opened and resealed it.

A signature algorithm is the recipe used to make and check that seal. Two families matter here:

  • RS256 is asymmetric. The server keeps a private key to sign and publishes a public key that anyone can use to check. The public key cannot be used to sign, so publishing it is safe.
  • HS256 is symmetric. One secret is used both to sign and to check. If you know the secret, you can make valid signatures yourself, so the secret must never be published.

Algorithm pinning means the server decides in advance which recipe it will accept, for example "only RS256", and refuses anything else before it even looks at the key. Without pinning, the server trusts the token's own label saying which recipe was used. That label is just text in the token, and an attacker controls it.

Algorithm confusion is the attack that follows from that. The attacker tells the server "this token is HS256", and the server, instead of refusing, takes its own RSA public key and uses it as the HS256 shared secret. Since the public key is public, the attacker can compute the same signature. The seal looks genuine because both sides used the same public value as the secret.

Setup

The report does not describe the researcher's tooling, accounts or environment. Two preconditions are stated explicitly and both matter for judging severity:

  1. Knowledge of a target user's UUID, which the program describes as non-enumerable.
  2. An active server-side session for that user.

Without both, the forged token does not get the attacker anywhere.

A UUID is a long identifier, something like a string of letters, digits and dashes, that a system uses to refer to one particular record, in this case one particular user. Non-enumerable means you cannot walk through the possible values or list them out: the identifier is not sequential and not exposed anywhere you can browse. So knowing a victim's UUID is itself a hurdle, not something an attacker gets for free.

An active server-side session means the service currently holds a live login state for that user on its own side. The forged token only worked in combination with that live state. This is why the bug was not something anyone could trigger against any account at any time.

Finding it

The verifier did not enforce algorithm pinning. In a correctly pinned implementation the server decides up front that tokens must be RS256 and rejects anything else before touching the key material. Here, a token declaring HS256 was verified using the RSA public key as the HMAC secret. Since the public key is, by definition, public, an attacker who can obtain it can compute a valid HS256 signature over any claims they like.

In everyday terms: a bouncer at a door is supposed to accept only one kind of ID. Instead, the bouncer reads the ID itself to learn what kind of ID to expect, and the ID says "I am the kind you accept". The check then runs, and it passes, because the thing being checked and the thing doing the checking came from the same place.

Exploitation

Step 1: Obtain the RSA public key

The report does not show how the public key was retrieved. What matters is that it is public material, so obtaining it is not the barrier.

This step exists because the whole attack depends on having that key. In a normal asymmetric setup the public key is meant to be shared, often published at a well-known address so clients can check signatures. The researcher needed it as raw material for the next step, not as a secret to steal.

Step 2: Forge an HS256 token

With the public key in hand, the attacker signs a token using HS256, treating the public key bytes as the HMAC secret, and sets the claims to identify the victim user. The report does not include the token, the claim set or the signing command.

Breaking that down:

  1. Take the public key, which is normally used only to check RS256 signatures.
  2. Use its bytes as if they were the shared secret of HS256.
  3. Build a token whose header says the algorithm is HS256.
  4. Put claims in the body that name the victim, using the UUID from the preconditions.
  5. Sign the whole thing with HS256 and that same public key as the secret.

The reason this works is that the server will later repeat step 2 in reverse: it will take its public key, treat it as the HS256 secret, and check the signature. Both sides used the same value, so the check passes. The attacker never needed the private key, because the server was never asked to use it.

Step 3: Use the token against v1 read endpoints

Under the two preconditions above, the forged token was accepted by v1 read endpoints for account information retrieval. The report does not list the specific endpoint paths, parameters or response bodies.

A read endpoint is an address that only returns information, like "show me my account details". It does not change anything. The attacker presents the forged token the way a normal client would present a real one, and the server treats the caller as the victim and returns that user's account information. This is the payoff of the previous two steps: the forged seal was accepted, so the data came back.

Step 4: Attempt state-changing endpoints

Every state-changing endpoint independently rejected the forged tokens. This is the key limit on the finding: the confusion bug bought read access only, with no privilege persistence and no account takeover.

A state-changing endpoint is an address that alters something: changing a password, updating a profile, moving data. These endpoints did their own check and refused the forged token. Privilege persistence would mean the attacker could keep access after the original session ended, for example by planting a new credential. Account takeover would mean full control of the victim's account. Neither happened, which is why the impact stayed read-only.

Root cause

The verifier did not pin the algorithm. It derived the verification method from the token's own alg header instead of enforcing RS256, so an HS256 token caused the RSA public key to be used as an HMAC secret. Because that key is public, the signature check passed for attacker-chosen claims.

The two preconditions, a non-enumerable UUID and a live server-side session, are what kept the bug from being trivially exploitable, and the independent rejection on state-changing endpoints is what kept the impact read-only.

The alg header is simply the field at the start of a JWT that names the algorithm. Trusting it is like letting a parcel declare its own customs category and never checking it. The safe design is for the server to hold a fixed list of accepted algorithms and compare against that list, not against whatever the token says.

Impact

An attacker who knows a target user's non-enumerable UUID and who has an active server-side session for that user could read account information through v1 read endpoints using a forged token. The program rates this high severity with a CVSS score of 7.7, and the bounty was 1337.00 USD.

CVSS is a standard scoring system for the severity of a security flaw. A score of 7.7 sits in the high band. The bounty is the money the program paid the researcher for the report.

The program is explicit about the ceiling: state-changing endpoints rejected the forged tokens, so there was no privilege persistence and no account takeover. The impact is read-only access under those conditions.

Fix

The v1 API verifier now enforces RS256 algorithm pinning and rejects any token using an alternative signature algorithm. The program states the fix has been deployed to production and verified effective.

In plain terms, the bouncer now accepts exactly one kind of ID and turns away everything else, without reading the ID to decide what to expect. A token that claims HS256 is refused before any key is used, so the public key can no longer be turned into a shared secret.

Variants to test

If a server follows those pointers without checking where they lead, an attacker can point it at their own key.

Hunting notes

A token that is rejected with a signature error when you change alg is a signal worth following.

Recon is the early phase of looking around a target to see what exists. JWKS is a standard endpoint that publishes a service's public keys so clients can fetch them, which is exactly the material this attack needs.

The two preconditions and the rejection on state-changing endpoints are stated plainly, which lets the program rate the finding accurately rather than overstate it.

Glossary

  • API: the set of addresses software uses to ask a service for data or to tell it to do something, as opposed to pages a person clicks.
  • Algorithm confusion: an attack where a server is tricked into checking a token with a different signing method than intended, letting a public key be used as a shared secret.
  • Algorithm pinning: the server fixing in advance which signing algorithm it accepts and rejecting all others.
  • Asymmetric signing: a method using a private key to sign and a public key to check, so the checking key can be shared safely.
  • Bounty: money a program pays a researcher for a valid security report.
  • Claim: a statement inside a token, such as which user it belongs to.
  • CVSS: a standard scoring system for the severity of a security flaw.
  • Endpoint: one specific address in an API that performs one specific job.
  • HMAC: a way of signing with a single shared secret, used by HS256.
  • HS256: a symmetric signing algorithm where one secret both signs and checks.
  • JSON Web Token (JWT): a signed piece of text carrying claims about a user, presented to a server to prove identity.
  • JWKS: a standard endpoint that publishes a service's public keys.
  • jku: a JWT header field giving a web address where keys can be fetched.
  • kid: a JWT header field naming which key was used, by identifier.
  • Non-enumerable: not listable or guessable by walking through possible values.
  • Privilege persistence: keeping access after the original session ends, for example by planting a new credential.
  • Public key: the shareable half of an asymmetric key pair, used to check signatures.
  • Read endpoint: an API address that only returns information and changes nothing.
  • Recon: the early phase of exploring a target to see what exists.
  • RS256: an asymmetric signing algorithm using a private key to sign and a public key to check.
  • Server-side session: a live login state the service holds on its own side for a user.
  • State-changing endpoint: an API address that alters data, such as changing a password.
  • Symmetric signing: a method where one shared secret both signs and checks.
  • UUID: a long identifier used to refer to one particular record, such as one user.
  • Verifier: the part of a server that checks a token's signature and contents.
  • alg header: the field at the start of a JWT naming the signing algorithm it claims to use.
  • 200: the standard HTTP status code for a successful request.
  • none algorithm: a JWT option meaning the token carries no signature at all.

More by kyotozzx

View all

1 more disclosed report, best first.

More from 8x8

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.