Free YouTube Transcribe

Video transcript

thousands of Google API keys exposed

John Hammond · 1,375 words · 7 min read

WhatsAppTelegramX

Want to search this transcript, jump the video from any line, or download it as TXT, SRT, or VTT?

Open in the transcript tool

Full transcript

0:00Where do you keep your API keys? Do you

0:02keep them secret, store them server-side

0:04in environment variables, or do you put

0:06them publicly out on the open internet

0:09in bare HTML pages? Now, I'm making

0:11light of it, but look, I can't fault

0:13you. No one can fault you because Google

0:15told you to. It's right there in the

0:17documentation. Say you were trying to

0:19set up Google Maps or the Google Maps

0:21API. Scrolling down, going through their

0:23instructions, they tell you to grab a

0:25key, and then when you need to make a

0:26request or use it, you include your API

0:29key in every request. So, the HTML on

0:32your website or JavaScript that it ends

0:34up using includes your key right there.

0:37They tell you to replace the API key in

0:40the public code with your own key's

0:43alphanumeric string. Now, if you were to

0:45go and create an API key to use in your

0:47code, you note AIZA as a standard start,

0:50but the default configuration is

0:52allowing the key to be unrestricted. So,

0:55they do give you a clue in the apply API

0:57key restriction segment, noting that

0:59really this means an unrestricted API

1:02key, which is what's created by default,

1:04could access any API. So, if you're

1:06wondering, why is Google telling you to

1:09put an unrestricted API key public and

1:12exposed to the internet? Well, it's

1:13because those aren't like API keys in

1:16the way we traditionally think about

1:18them. They say, "These API keys for

1:20Firebase services are not secret. The

1:23keys are designed for project

1:25identifiers for billing, and they aren't

1:28designed to be used as authentication

1:30credentials. They are public by design.

1:33So, okay, right? That's fine. It seems

1:36fine up until a certain point. A new

1:40wrinkle in the time-space continuum kind

1:42of put that on its head, and you know

1:44what it was? Google's AI Gemini. This is

1:47some really cool new research from my

1:49friends over at Truffle Security, the

1:51folks that make Truffle Hog, and their

1:53blog says, "Google API keys weren't

1:55secrets, but then Gemini changed the

1:58rules. So, however long the Google

2:01documentation has straight up told you

2:03and developers, "It's fine to throw

2:05those keys into code. They aren't

2:07secret. They can be public." But Gemini

2:10will use the same API key, and if by

2:13default they are unrestricted and you

2:15can use any key to then access Gemini if

2:18it's enabled, oh, almost 3,000 websites

2:21have these exposed keys. Originally

2:24meant in the totally fine, safe to use

2:26scenario, but now Gemini is not what it

2:29was intended to be used by and now can

2:32be abused. So, someone could access any

2:35of your uploaded files, cache data, or

2:37just rack up tokens. I love the graphic

2:40here. 2019, remember hot girl summer?

2:43When it was fine to just have that

2:45dangling, but now it can be leveraged

2:47with Gemini. They walk through the same

2:49thing that I was kind of telling you

2:50about, and here's the thing. Enabling

2:53the Gemini API or generative language

2:55API on any of your Google Cloud

2:57projects, all the other keys that might

2:59have already existed like Google Maps,

3:01like Firebase, whatever, can now be used

3:04to hit the Gemini API, and you didn't

3:06know. So, now, however long those keys

3:09have been out and about, there's a funny

3:11unintentional risk that maybe we just

3:13forgot about, and the default setup just

3:16makes this open access. I got to be

3:18honest, I think the funniest thing is

3:21that we were just sort of like, "Oh,

3:22whoops. We didn't know. We didn't

3:24realize. We forgot." I don't know. I'm

3:26assuming, right? That's my

3:27interpretation of this kind of thing

3:29because all it needs is like, "Okay,

3:31cool. You found what was just a a public

3:33key." And then Gemini is going to be

3:35able to respond. So, if you find that on

3:37some website, oh, you slap it into this

3:39URL, and then you can talk to the AI

3:41inside their environment. And I started

3:43to wonder, "Oh, could you just then

3:45access all of the other APIs? Maybe get

3:49into Google Drive. Maybe get into Google

3:51Docs." No, I mean you'll still be within

3:54the Gemini enclave, but any of the

3:55uploaded files like pictures or cash

3:57info there would be exposed and

3:59accessible. And almost 3,000 of these

4:01are already out there. They scanned the

4:03November 2025 Common Crawl data set, a

4:06massive 700 Tiberius uh tebibytes, not

4:10Tiberius or tibs. The Common Crawl

4:12archive contains 2.29 billion pages.

4:15That's pretty cool. I got to be honest,

4:17I didn't know this thing existed. But

4:18anyways, they hunted through that and

4:20found all of those live API keys. And

4:23the victims there, right? Victims,

4:25victims at risk and waiting to

4:27potentially be leveraged. Major

4:28financial institutions, security

4:30companies, global recruiting firms, and

4:31oh notably Google themselves. I'm sorry,

4:35I'm not I'm not poking fun, but this is

4:37kind of a cool way to like really

4:38demonstrate impact. We provided Google

4:40with concrete examples from their own

4:42infrastructure. These keys were left

4:44hanging out in a Google product's

4:45public-facing website. They tracked it

4:47down on the Internet Archive from 2023,

4:51way before Gemini was kicking around.

4:53Used totally as a public project

4:55identifier as the documentation tells

4:58you to, but now they're able to go ahead

5:00and use that and interrogate Gemini.

5:03With the key deployed years ago. I just

5:05think that's wild. But look, the

5:07disclosure timeline, I wanted to get to

5:09this cuz it sounds like they were

5:10discussing this in November. Google uh

5:13called it good to start, and then they

5:16danced a little bit, was able to really

5:18prove some impact with the suite uh

5:20actually Google, it's affecting you,

5:21too. Then Google leans in, they get the

5:23list of these exposed and affected

5:25customers, and they got an internal

5:28pipeline to discover these leaked keys,

5:30restrict exposed keys from accessing

5:32Gemini API, and we're committed to

5:34addressing the root cause before our

5:35disclosure date.

5:37Uh

5:40disclosure date ended. So, been chatting

5:42with Dylan and the Truffle team, and I

5:45guess they still haven't heard anything

5:46back yet. But wanted to spread the word,

5:49kind of tell the story, cuz I think it's

5:51kind of wild. It was tough to get this

5:54across the desk, and there has been some

5:57movement, but not a lot. So, I guess

5:59it's really, you know, as again, up to

6:01us to spread the word and communicate

6:04the understanding of this to folks. And

6:06then know that, look, you can go track

6:08down what GCP or Google Cloud projects

6:12you happen to have that are using API

6:15keys if they are unrestricted, and then

6:17go ahead and clean those up. Especially

6:19considering Google's own public API keys

6:23that are now meant to be private because

6:26a Gemini exists, and that API key

6:28originally totally intended, literally

6:30documented and designed to be public,

6:32now really should be a little bit more

6:34secret. Or at least we make sure we

6:36toggle off that insecure default of

6:38having the API key and access to every

6:40other API. I don't want to gloss over

6:42though, Google has put out a little bit

6:44more road map as to how you have a

6:47little bit more understanding of this.

6:48They do want to proactively notify folks

6:51when their API key is out and about, but

6:53they plan to now move all new keys with

6:56Google AI Studio to be limited by

6:59default in an effort to prevent this

7:01unintended cross key usage. So, fingers

7:04crossed that is coming together. But

7:05man, shout out to TruffleHog, Truffle

7:08Security, right? You could use

7:10TruffleHog to go track it down in your

7:11own code base, and they've got a webinar

7:13video with a little bit more

7:15explanation, just about 15 minutes,

7:16pretty easy, from Joe, Joe Leon, the

7:18researcher that dug into all this. So,

7:20credit, kudos, credit where credit is

7:22due, my friend. Super cool stuff. Hey,

7:23that's it. Rotate your keys. What you

7:26thought wasn't a secret now is. AI

7:28overlords are doing their thing. Link

7:30below to all the sweet resources, but

7:33dude, what a neat finding.

More from John Hammond

All 86 transcripts from John Hammond

Recently added transcripts

Browse the whole transcript library Browse all English transcripts

This transcript was generated from the captions YouTube publishes for this video. Get the transcript of any YouTube video atfreeyoutubetranscribe.com, free, unlimited, no sign-up.