CMOtech US - Technology news for CMOs & marketing decision-makers
United States
AWS Is parsing its way out of a CVE class. In the age of AI exploits, every team should

AWS Is parsing its way out of a CVE class. In the age of AI exploits, every team should

Wed, 25th Nov 2026 (Today)
Dan Lynch
DAN LYNCH Founder Constructive

When you build a house, you don't ask the builder to mill a 2x4 from a tree or the electrician to forge an outlet from raw copper. You buy standard parts off the shelf, so they fit together and behave the same way every time. Nobody gets excited about a 2x4 or an electrical socket. They are what make everything above them trustworthy.

Software security needs parts like that right now. We are living through a wave of serious exploits, and AI is making bugs cheaper to find and weaponize. The tempting answer is to point more AI at the problem and throw everything over to inference. But a model is probabilistic. It gives you a very good guess, then a slightly different guess next time. "Usually right" is how breaches happen.

What we need underneath the agents is something exact: tools that actually understand code. In my world, that means parsing.

What a parser actually does

Take "The dog bit the man." You read a structure: subject, verb, object. Swap two words and the meaning flips.

Code works the same way. A parser turns code into a tree that shows its structure: this is a SELECT statement, this is a table, this is a function call, this is a plain string. That tree is called an abstract syntax tree, or AST. I think of it as the DNA of software. Before PostgreSQL runs a query, it turns it into a tree like this. The tree, not the text, is what runs.

If you understand the entire dialect the way the database does, you can pluck out insecure code with certainty instead of hunting for suspicious-looking strings.

Why reading text isn't enough

PostgreSQL learned this the hard way in early 2025. Rapid7 researchers found CVE-2025-1094 while studying the exploit for a BeyondTrust flaw linked to the reach at the US Treasury Department. Input had been properly escaped, but certain invalid byte sequences let an attacker end a quoted string early. The escaping code and the psql tool disagreed about where the string stopped. Two programs read the same text two different ways, and that gap was the attack.

The lesson: security breaks wherever your checker and your database read code differently. The fix is for the checker to use the same grammar as the database.

What AWS engineers did

AWS publishes open source driver wrappers for Aurora and RDS, including one for Node.js. These drivers run their own SQL in the background. Over the past year, that internal SQL produced a run of high-severity CVEs across AWS's driver family: CVE-2025-12967 in the Node, Java, Python and Go wrappers, then CVE-2026-11400 and CVE-2026-11401. The pattern was the same each time. A query called a built-in function by its short name, like count(), and a low-privilege user could plant a look-alike function that would then run with a more powerful user's rights. Security folks call this search_path hijacking.

The Node.js team fixed the queries by hand, twice. Then a new feature brought the same mistake back.

So on 8 October 2026, AWS engineers adopted a build-time check in CI. It parses every SQL statement in the driver with libpg-query, the Postgres parser at the heart of the open source toolchain I maintain, walks the tree, and fails the build if any function, operator or type is left unqualified and could be redirected. In the same pull request, it exposed one the engineers had missed: a bare count(1) in a Global Database query. The pull request is public.

That isn't AI. It is a deterministic rule on a real parse tree, giving the same answer on every pull request. It doesn't patch one bug. It closes off an entire class of them.

Standards make this possible

The check is only a couple hundred lines, because the hard part was already a standard part on the shelf.

JavaScript developers know Babel. It parses code into a tree, lets tools traverse and transform it, then generates working code back out. My team and I set out to build the Babel for Postgres tooling, and it has been the work of close to a decade. It starts from PostgreSQL's own grammar and wraps it in a toolchain that lets programs parse SQL into a tree, traverse it, change it safely with types for every node, and deparse it back into SQL that Postgres accepts.

Like a 2x4, it interoperates. Teams building databases, editors, linters and security checks pick up the same parts and get the same answers. That is a big part of why our open source Postgres tooling passed 300 million downloads on 10 November 2026, up from 100 million in February, with more than 50 million a month and growth of more than nine times year over year.

Let models draft. Let parsers decide.

I am not against AI. I use agents every day, and they will write more and more of our code. That is exactly why the layer beneath them has to be exact. Let models draft and explore. Then verify their output with tools that understand the language completely, the way an inspector checks wiring against code, not vibes.

We apply the same idea to Postgres row-level security and permissions with Safegres, and this week we published a hands-on course, Securing Postgres with Safegres, for teams that want to put deterministic checks into their own CI.

Inference is a powerful new tool on the job site. But in an era of AI-speed exploits, you still want your 2x4s cut to standard.