← All advisories
CVE-2026-63506High · CVSS 8.8· CWE-639

[Broken Access Control] letting any TinaCloud user authorize against any self-hosted site

Vendor
tinacms
Product
tinacms
Status
Published · Jul 17 2026
Researchers
riodrwn
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published
Jul 30 2026

Summary

@tinacms/auth's isAuthorized(req) decides authorization by validating the caller's bearer token against https://identity.tinajs.io/v2/apps/${req.query.clientID}/currentUser, where the clientID comes from the request and is never compared to the site's own configured TinaCloud app id. The function answers "is this token a verified user of whatever app the caller named?" instead of "is this token a verified user of THIS site?"

Any TinaCloud user can create their own free app, get a valid token for it, and send ?clientID=<their-own-app> plus Authorization: <their-own-token> to a victim self-hosted site. The victim's authorized callback runs const user = await isAuthorized(req); return user && user.verified, which returns true, and the victim authorizes the attacker.

The attacker holds no account on the victim and needs no victim interaction. With the media handlers this grants read, upload, and delete on the victim's media bucket. When the backend uses TinaCloudBackendAuthProvider() (the default the tinacms init wizard generates for TinaCloud auth), it grants full GraphQL read, write, and delete of the victim's content.

Affected code (confirmed at 5a6839f)

packages/@tinacms/auth/src/index.ts:71-88 reads the clientID from the request:

export const isAuthorized = async (req: NextApiRequest) => {
  const clientID = req.query.clientID;     // attacker-controlled
  const token = req.headers.authorization; // attacker-controlled
  if (typeof clientID === 'string' && typeof token === 'string') {
    return await isUserAuthorized({ clientID, token });
  }
  return undefined;
};

index.ts:16-43 sends that caller-chosen clientID straight to the identity server, and returns the user on 200:

const tinaCloudRes = await fetch(
  `https://identity.tinajs.io/v2/apps/${clientID}/currentUser`,
  { headers: new Headers({ 'Content-Type': 'application/json', authorization: token }), method: 'GET' }
);
if (tinaCloudRes.ok) { return await tinaCloudRes.json(); }

index.ts:118-135 (TinaCloudBackendAuthProvider) gates only on verified, which reflects the attacker's own email verification:

isAuthorized: async (req, _res) => {
  const user = await isAuthorized(req as NextApiRequest);
  if (user && user.verified) return { isAuthorized: true };
  return { isAuthorized: false, errorCode: 401, errorMessage: 'Unauthorized' };
},

Every media-store README wires the same gate (next-tinacms-cloudinary/README.md:113-122, identical in s3 and dos):

authorized: async (req, _res) => {
  if (process.env.NEXT_PUBLIC_USE_LOCAL_CLIENT === '1') return true;
  const user = await isAuthorized(req);
  return user && user.verified;   // no clientID === <this site's app> check
}

The bug is duplicated in next-tinacms-azure/src/auth.ts:34-51 (req.nextUrl.searchParams.get('clientID')). Downstream nothing pins the site's clientID: @tinacms/datalayer/src/backend/index.ts:201 gates on the boolean, and next-tinacms-cloudinary/src/handlers.ts:36 returns 401 only when the callback is false. The tinacms init TinaCloud path ships this by default (@tinacms/cli/.../prompts/authProvider.ts:17 -> TinaCloudBackendAuthProvider(), used in templates/tinaNextRoute.tsx:21-24 for every non-local deployment).