Skip to content
Access control Write-up Intermediate

Chromium infra leak

The authorisation check in a Chromium CI authentication service could be bypassed by including a specific internal path anywhere in the request URL, letting any logged-in Google user obtain access to the AuthDB and download it. A separate issue was that an RPC Explorer web interface lacked frame-embedding protection, allowing clickjacking.

NDevTK Follow

Published on ndevtk.github.io

Bounty$1,000 View original

LUCI is the CI (Continuous integration) infrastructure for the Chromium project. This database represents all data used when authorizing incoming requests and handling authentication related tasks: user groups, IP allow lists, OAuth client ID allowlist, etc.

NDevTK, on ndevtk.github.io

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against 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. 5 min read.

Context

LUCI is the continuous integration infrastructure for the Chromium project. The component in this report is the AuthDB, a database that holds all the data used when authorising incoming requests and handling authentication related tasks: user groups, IP allow lists, the OAuth client ID allowlist, and similar configuration.

The AuthDB is served by an App Engine service reachable at defaultv2-dot-chrome-infra-auth.appspot.com, which exposes an auth_service API. Access to the AuthDB is meant to be restricted to members of the auth-trusted-services group or administrators, as described in the documentation for AuthService.RequestAccess at https://pkg.go.dev/go.chromium.org/luci/server/auth/service#AuthService.RequestAccess.

Setup

The researcher logged in as any normal Google user. The researcher logged in as an ordinary Google user, not as a member of any privileged group. The steps below use the OAuth implicit flow to obtain an access token for the https://www.googleapis.com/auth/userinfo.email scope, then call the AuthDB API with that token.

Finding it

The authorisation check on the auth_service API could be bypassed by placing a particular path fragment anywhere in the request URI. The fragment is the importer endpoint path:

Text
/auth_service/api/v1/importer/ingest_tarball/

When that string appears in the request URI, the permission check is skipped. Without it, the API correctly refuses the request with a message stating that the user is not a member of auth-trusted-services or administrators.

Exploitation

Step 1: obtain an access token

Log in to the following URL as any normal Google user:

Text
https://accounts.google.com/o/oauth2/v2/auth?gsiwebsdk=3&client_id=446450136466-[redacted].apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&redirect_uri=https%3A%2F%2Fdefaultv2-dot-chrome-infra-auth.appspot.com%2Fauth%2Fopenid%2Fcallback&prompt=select_account&response_type=token&include_granted_scopes=false&enable_granular_consent=true

This is a standard Google OAuth authorisation request. The client_id belongs to the Chrome infra auth application, the redirect_uri points at its OpenID callback on defaultv2-dot-chrome-infra-auth.appspot.com, the scope is userinfo.email, and response_type=token selects the implicit flow, so the token is returned in the URL fragment rather than through a code exchange.

Step 2: copy the token

After the redirect, copy the access_token value from the URL hash.

Step 3: request access to the AuthDB

On that same page, run the following:

JavaScript
fetch(
  'https://defaultv2-dot-chrome-infra-auth.appspot.com/auth_service/api/v1/authdb/subscription/authorization?x=/auth_service/api/v1/importer/ingest_tarball/',
  {
    headers: {
      authorization: 'Bearer <token goes here>'
    },
    referrerPolicy: 'strict-origin-when-cross-origin',
    method: 'POST',
    mode: 'cors'
  }
);

The endpoint is authdb/subscription/authorization. The bypass lives in the query string: the parameter x carries the importer path fragment, so the full request URI contains /auth_service/api/v1/importer/ingest_tarball/ even though the actual endpoint being called is the subscription authorisation one. The request is a POST with the OAuth token in the Authorization header as a bearer token, sent cross-origin with mode: 'cors'.

The result is that the caller is granted permission to the luci-go AuthDB without being in the auth-trusted-services group. The response is:

JSON
{"topic":"projects/chrome-infra-auth/topics/auth-db-changed","authorized":true,"gs":{"auth_db_gs_path":"chrome-infra-auth.appspot.com/auth-db","authorized":true}}

This discloses the Pub/Sub topic used for AuthDB change notifications (projects/chrome-infra-auth/topics/auth-db-changed) and the Cloud Storage path of the AuthDB (chrome-infra-auth.appspot.com/auth-db), and confirms authorisation for both.

Step 4: download the database

The same API can be used to download the AuthDB itself:

JavaScript
fetch(
  'https://defaultv2-dot-chrome-infra-auth.appspot.com/auth_service/api/v2/authdb/revisions/latest?x=/auth_service/api/v1/importer/ingest_tarball/',
  {
    headers: {
      authorization: 'Bearer <token>'
    },
    referrerPolicy: 'strict-origin-when-cross-origin',
    method: 'GET',
    mode: 'cors'
  }
);

Here the endpoint is authdb/revisions/latest on API version v2, again with the importer path fragment smuggled in through the x query parameter, and a GET instead of a POST. The bearer token is the same one obtained in step 1.

Root cause

The permission check is performed against the raw request URI using a substring test. The code is:

Text
strings.Contains(ctx.Request.URL.RequestURI(), "/auth_service/api/v1/importer/ingest_tarball/")

Because strings.Contains matches anywhere in the URI, any request that carries the importer path in a query parameter, or anywhere else in the URI, satisfies the check and skips the group membership requirement. The check does not verify that the importer path is the actual endpoint being invoked.

Without the fragment, the same request is rejected with:

JSON
{"text":"user:[redacted] is not a member of auth-trusted-services or administrators"}

That response confirms the intended control was in place and that the bypass, rather than a missing check, was what allowed access.

Impact

With any normal Google account, the researcher obtained authorisation to the luci-go AuthDB and downloaded the latest revision of the database. The database contains the data used for authorising incoming requests and handling authentication: user groups, IP allow lists, the OAuth client ID allowlist and similar configuration. The subscription authorisation response also disclosed the Pub/Sub topic and the Cloud Storage path for the AuthDB. The report does not describe what an attacker could do with the downloaded data beyond reading it.

Fix

The bypass was fixed in https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/5595490. The report does not describe the contents of the change.

Variants to test

The same pattern applies to any authorisation check that matches a path fragment against the whole request URI rather than the parsed path. Concrete things to try:

  1. Append the privileged path as a query parameter on a restricted endpoint, as in ?x=/privileged/path/, and see whether the restricted response changes to a success. A positive result is a response that would normally require a privileged group.
  2. Place the fragment in other URI components that RequestURI() includes, such as a path suffix or a fragment-like segment, and check whether the check still passes. A positive result is the same privileged response.
  3. Try the fragment on sibling endpoints under the same service, for example read endpoints versus write endpoints, to see how far the exemption extends. A positive result is any endpoint returning data or performing an action it should refuse.
  4. Compare the response with and without the fragment to confirm the control exists at all. A negative result without the fragment and a positive one with it is the signature of this bug.

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. 15 min read.

What happened, in plain words

Google runs a large system called LUCI that builds and tests the Chromium browser automatically, many times a day. LUCI needs to know who is allowed to do what, and it keeps that information in a database called the AuthDB. The AuthDB is like the guest list and the key cabinet of a building: it says which people belong to which groups, which network addresses are trusted, and which applications are allowed to talk to the service.

A security researcher found that the door to this database could be opened by anyone with an ordinary Google account. The trick was to put a particular piece of text into the web address of a request. The service was supposed to check whether you belong to a trusted group before answering. Instead, it looked at the whole address, saw that special text somewhere inside it, and skipped the check. The researcher could then ask the service to confirm access and to hand over the latest copy of the database.

Google fixed the problem and paid a 1000 USD bounty. The report also mentions a second, smaller issue about a web page that could be embedded inside another site, which was fixed separately.

This article walks through the report step by step, explaining every term as it appears.

Background: what LUCI and the AuthDB are

LUCI is the continuous integration infrastructure for the Chromium project. "Continuous integration" means that whenever someone changes the browser's code, a system automatically builds it and runs tests, so mistakes are caught quickly. Think of it as a factory assembly line that checks every part as it arrives.

A factory like that needs rules about who may press which buttons. That is the job of the AuthDB. It is a database that holds all the data used when authorising incoming requests and handling authentication related tasks: user groups, IP allow lists, the OAuth client ID allowlist, and similar configuration.

A few of those words deserve a plain explanation:

  • Authentication is proving who you are, like showing your passport at a border.
  • Authorisation is deciding what you are allowed to do once you are known, like the border officer checking whether your visa lets you work or only visit.
  • A user group is a named list of accounts, for example "trusted services". Being in the group is what grants permission.
  • An IP allow list is a list of network addresses that are permitted in. Every device on the internet has an address, a bit like a postal address, and the list says which addresses may enter.
  • An OAuth client ID identifies an application that is allowed to ask Google for permission on a user's behalf. It is like a membership card issued to an app rather than a person.

The AuthDB is served by an App Engine service reachable at defaultv2-dot-chrome-infra-auth.appspot.com, which exposes an auth_service API.

App Engine is Google's service for running web applications without managing the servers yourself. An API (application programming interface) is a set of web addresses a program can call to ask another program to do something or return data. You can think of it as a restaurant menu: each dish has a name, you order by name, and the kitchen returns the dish. The auth_service API is the menu of the authentication service.

Access to the AuthDB is meant to be restricted to members of the auth-trusted-services group or administrators, as described in the documentation for AuthService.RequestAccess at https://pkg.go.dev/go.chromium.org/luci/server/auth/service#AuthService.RequestAccess. In other words, only the trusted staff and the trusted automated services should be able to read it.

Setup: what you need before starting

The researcher logged in as any normal Google user. The researcher logged in as an ordinary Google user, not as a member of any privileged group. That matters: the whole point is that no special access was needed at the start.

The steps below use the OAuth implicit flow to obtain an access token for the https://www.googleapis.com/auth/userinfo.email scope, then call the AuthDB API with that token.

OAuth is the system that lets you sign in to one service with your Google account and lets that service ask Google for limited information about you, without ever seeing your password. When you click "Sign in with Google" on a website, OAuth is what happens behind the scenes.

A scope is the specific permission being requested. Here the scope is userinfo.email, which means "may I learn the email address of the signed-in user?" Nothing more.

An access token is a short string of characters that proves you completed that sign-in. It works like a cloakroom ticket: whoever holds the ticket can collect the coat, so the ticket must be kept secret. The service checks the ticket instead of asking you to log in again on every request.

The implicit flow is one particular way OAuth can hand over a token. In this flow the token is returned directly in the address bar after the redirect, rather than through an extra server-to-server exchange. That is why the next step says to copy it from the URL.

Finding it

The authorisation check on the auth_service API could be bypassed by placing a particular path fragment anywhere in the request URI. The fragment is the importer endpoint path:

Text
/auth_service/api/v1/importer/ingest_tarball/

A URI (uniform resource identifier) is the full web address of a request, including everything after the question mark. A path fragment here simply means a piece of text that looks like part of a web address. The importer endpoint path is the piece of text used in the bypass.

When that string appears in the request URI, the permission check is skipped. Without it, the API correctly refuses the request with a message stating that the user is not a member of auth-trusted-services or administrators.

This is the heart of the bug. The check did not ask "is the endpoint being called the importer?" It only asked "does this text appear somewhere in the address?" Those two questions sound similar but are very different, and the gap between them is the vulnerability. Security people call this class of mistake an authorisation bypass: a rule exists, but a way around it exists too.

Exploitation

Step 1: obtain an access token

Log in to the following URL as any normal Google user:

Text
https://accounts.google.com/o/oauth2/v2/auth?gsiwebsdk=3&client_id=446450136466-[redacted].apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&redirect_uri=https%3A%2F%2Fdefaultv2-dot-chrome-infra-auth.appspot.com%2Fauth%2Fopenid%2Fcallback&prompt=select_account&response_type=token&include_granted_scopes=false&enable_granular_consent=true

This is a standard Google OAuth authorisation request. Reading it piece by piece:

  • accounts.google.com/o/oauth2/v2/auth is Google's sign-in endpoint for OAuth requests.
  • client_id=446450136466-[redacted].apps.googleusercontent.com identifies the Chrome infra auth application. It tells Google which app is asking.
  • scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email is the permission being requested, the user's email address. The %3A and %2F are just how a colon and a slash are written inside a URL.
  • redirect_uri=https%3A%2F%2Fdefaultv2-dot-chrome-infra-auth.appspot.com%2Fauth%2Fopenid%2Fcallback is where Google will send the browser afterwards: the OpenID callback of the same App Engine service. OpenID is the part of this system that confirms identity.
  • response_type=token selects the implicit flow, so the token is returned in the URL fragment rather than through a code exchange.
  • prompt=select_account makes Google show the account chooser, so you pick which Google account to use.
  • include_granted_scopes=false and enable_granular_consent=true are options about how permissions are presented and combined.

The reason for this step is simple: the API will not talk to an anonymous caller. You first need a token that says "this request comes from a real, signed-in Google user".

Step 2: copy the token

After the redirect, copy the access_token value from the URL hash.

The URL hash is the part of a web address after the # symbol. Browsers normally use it to jump to a section of a page, and it is not sent to the server. In the implicit flow, the token arrives there. Copying it out by hand is how the researcher got the credential for the next requests.

Step 3: request access to the AuthDB

On that same page, run the following:

JavaScript
fetch(
  'https://defaultv2-dot-chrome-infra-auth.appspot.com/auth_service/api/v1/authdb/subscription/authorization?x=/auth_service/api/v1/importer/ingest_tarball/',
  {
    headers: {
      authorization: 'Bearer <token goes here>'
    },
    referrerPolicy: 'strict-origin-when-cross-origin',
    method: 'POST',
    mode: 'cors'
  }
);

This is JavaScript, the language browsers run. fetch is the browser function for sending a request to a web address and getting a response back. Line by line:

  • The first argument is the address being called. The real endpoint is authdb/subscription/authorization, which asks the service to confirm that the caller is authorised to receive notifications about AuthDB changes. After the question mark comes x=/auth_service/api/v1/importer/ingest_tarball/. The x is a query parameter, a named value attached to the address, and its value is the importer path fragment.
  • headers are extra pieces of information attached to the request, like the label on a parcel. authorization: 'Bearer <token goes here>' is where the token from step 2 is placed. Bearer means "whoever bears (carries) this token is treated as the owner", which is why it must be kept secret.
  • referrerPolicy: 'strict-origin-when-cross-origin' controls how much information the browser shares about which page the request came from.
  • method: 'POST' says this request is sending something rather than just asking for a page. GET and POST are the two most common request methods: GET asks for data, POST submits data.
  • mode: 'cors' relates to CORS, the browser rule that decides whether a page from one site may read a response from another site. Setting it explicitly tells the browser this is a cross-site request.

The endpoint is authdb/subscription/authorization. The bypass lives in the query string: the parameter x carries the importer path fragment, so the full request URI contains /auth_service/api/v1/importer/ingest_tarball/ even though the actual endpoint being called is the subscription authorisation one. The request is a POST with the OAuth token in the Authorization header as a bearer token, sent cross-origin with mode: 'cors'.

The result is that the caller is granted permission to the luci-go AuthDB without being in the auth-trusted-services group. The response is:

JSON
{"topic":"projects/chrome-infra-auth/topics/auth-db-changed","authorized":true,"gs":{"auth_db_gs_path":"chrome-infra-auth.appspot.com/auth-db","authorized":true}}

JSON is a way of writing structured data as text, using curly brackets for objects and quotes for names. This response says several things:

  • topic is projects/chrome-infra-auth/topics/auth-db-changed. A Pub/Sub topic is a named channel in Google's messaging service; services can subscribe to it to be told when something happens. Here it is the channel that announces AuthDB changes.
  • authorized: true means the service accepted the caller as authorised.
  • gs stands for Google Cloud Storage, Google's file storage service. auth_db_gs_path is the storage location of the AuthDB, chrome-infra-auth.appspot.com/auth-db, and its own authorized: true confirms access there too.

So this single response disclosed the Pub/Sub topic used for AuthDB change notifications and the Cloud Storage path of the AuthDB, and confirmed authorisation for both. In everyday terms, the researcher asked "am I on the list?" and the answer was not only "yes" but also "and here is where we keep the files".

Step 4: download the database

The same API can be used to download the AuthDB itself:

JavaScript
fetch(
  'https://defaultv2-dot-chrome-infra-auth.appspot.com/auth_service/api/v2/authdb/revisions/latest?x=/auth_service/api/v1/importer/ingest_tarball/',
  {
    headers: {
      authorization: 'Bearer <token>'
    },
    referrerPolicy: 'strict-origin-when-cross-origin',
    method: 'GET',
    mode: 'cors'
  }
);

Here the endpoint is authdb/revisions/latest on API version v2, again with the importer path fragment smuggled in through the x query parameter, and a GET instead of a POST. The bearer token is the same one obtained in step 1.

A revision is one saved version of a database. Asking for latest means "give me the most recent one". The reason for this step is to show that the bypass was not limited to a harmless confirmation message: the same trick let the researcher fetch the actual contents of the database.

Root cause

The permission check is performed against the raw request URI using a substring test. The code is:

Text
strings.Contains(ctx.Request.URL.RequestURI(), "/auth_service/api/v1/importer/ingest_tarball/")

This is a line of Go, the programming language LUCI is written in. ctx.Request.URL.RequestURI() means "give me the full address of the incoming request". strings.Contains(...) means "does this text contain this other text anywhere inside it?" So the line reads: if the full address contains the importer path anywhere, treat the request as the importer.

Because strings.Contains matches anywhere in the URI, any request that carries the importer path in a query parameter, or anywhere else in the URI, satisfies the check and skips the group membership requirement. The check does not verify that the importer path is the actual endpoint being invoked.

A useful comparison is a bouncer who lets anyone in whose bag has a staff badge somewhere inside it, instead of checking that the person is wearing the badge. The badge is in the bag, so the door opens, even though the person is not staff.

Without the fragment, the same request is rejected with:

JSON
{"text":"user:[redacted] is not a member of auth-trusted-services or administrators"}

That response confirms the intended control was in place and that the bypass, rather than a missing check, was what allowed access. In other words, the lock worked; the researcher simply found a way to make the door believe it was a different door.

Impact

With any normal Google account, the researcher obtained authorisation to the luci-go AuthDB and downloaded the latest revision of the database. The database contains the data used for authorising incoming requests and handling authentication: user groups, IP allow lists, the OAuth client ID allowlist and similar configuration. The subscription authorisation response also disclosed the Pub/Sub topic and the Cloud Storage path for the AuthDB. The report does not describe what an attacker could do with the downloaded data beyond reading it.

The report stops at describing the disclosure itself.

Fix

The bypass was fixed in https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/5595490. The report does not describe the contents of the change.

Variants to test

The same pattern applies to any authorisation check that matches a path fragment against the whole request URI rather than the parsed path. Concrete things to try:

  1. Append the privileged path as a query parameter on a restricted endpoint, as in ?x=/privileged/path/, and see whether the restricted response changes to a success. A positive result is a response that would normally require a privileged group.
  2. Place the fragment in other URI components that RequestURI() includes, such as a path suffix or a fragment-like segment, and check whether the check still passes. A positive result is the same privileged response.
  3. Try the fragment on sibling endpoints under the same service, for example read endpoints versus write endpoints, to see how far the exemption extends. A positive result is any endpoint returning data or performing an action it should refuse.
  4. Compare the response with and without the fragment to confirm the control exists at all. A negative result without the fragment and a positive one with it is the signature of this bug.

These are general testing ideas, not steps that were carried out in this report. The principle behind them is always the same: when a rule is enforced by searching for text in an address, try putting that text somewhere the rule did not expect.

A second issue: clickjacking in the RPC Explorer

The report also describes a separate, smaller problem. Go-based services that has gRPC APIs, import "go.chromium.org/luci/server", and call server.Main Get a web based user interface for example https://ci.chromium.org/rpcexplorer/services/; this used to not have embed protection.

A few terms here:

  • gRPC is a way for programs to call each other over a network, common in Google's infrastructure.
  • RPC Explorer is a web page that lets a person browse and call those gRPC services from the browser. It is a convenient control panel.
  • Embed protection stops one website from loading another website inside a frame, a small window embedded in a page.

Without embed protection, a page can be loaded inside a frame on another site. That attack is called clickjacking: the victim sees and clicks what looks like an innocent page, but the clicks land on the hidden embedded page. It is like placing a transparent sheet over a form so that the signature line sits under the word "subscribe".

This was fixed in https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/4889788.

Glossary

  • Access token: a short secret string proving a user completed a sign-in, sent with requests instead of a password.
  • API: a set of web addresses a program can call to ask another program to do something or return data.
  • App Engine: Google's service for running web applications without managing servers yourself.
  • Authentication: proving who you are.
  • Authorisation: deciding what a known user is allowed to do.
  • Authorisation bypass: a way around an access rule that leaves the rule in place but ineffective.
  • Bearer token: a token where whoever holds it is treated as its owner, so it must be kept secret.
  • Clickjacking: tricking a user into clicking a hidden embedded page by covering it with an innocent-looking one.
  • Client ID: an identifier for an application that is allowed to ask Google for permission on a user's behalf.
  • Continuous integration: automatically building and testing code whenever it changes.
  • CORS: the browser rule that decides whether a page from one site may read a response from another site.
  • Embed protection: a setting that stops a website from being loaded inside a frame on another site.
  • Endpoint: one specific address in an API that performs one specific job.
  • GET: a request method that asks for data.
  • gRPC: a way for programs to call each other over a network.
  • Header: extra information attached to a request, such as a token or a content type.
  • Implicit flow: an OAuth method that returns the token directly in the URL after sign-in.
  • IP allow list: a list of network addresses that are permitted to connect.
  • JSON: a text format for structured data using brackets, quotes and colons.
  • LUCI: the continuous integration infrastructure for the Chromium project.
  • OAuth: the system that lets a service ask Google for limited information about a signed-in user without seeing the password.
  • OpenID: the part of the sign-in system that confirms a user's identity.
  • Path fragment: a piece of text that looks like part of a web address.
  • POST: a request method that submits data.
  • Pub/Sub topic: a named channel in Google's messaging service that services can subscribe to for notifications.
  • Query parameter: a named value attached to a web address after a question mark.
  • Revision: one saved version of a database.
  • RPC Explorer: a web page for browsing and calling gRPC services from the browser.
  • Scope: the specific permission requested during an OAuth sign-in.
  • Substring test: checking whether one piece of text appears anywhere inside another.
  • URI: the full web address of a request, including everything after the question mark.
  • URL hash: the part of a web address after the # symbol, not sent to the server.
  • User group: a named list of accounts used to grant permissions.

More by NDevTK

View all

31 more disclosed reports, best first.

More from Google

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.