# Critical CVE | Exploited? What to Do First

Canonical: https://agenticcli.dev/blog/critical-cve-pull-request
Published: 2026-11-15 · Updated: 2026-11-30

**Short answer:** A critical CVE is a publicly listed security flaw scored 9.0 to 10.0 on the CVSS scale, and attackers now move within hours. First check whether you run the affected version and whether it is in CISA KEV, then patch or take it offline. In a repo, make npm audit a required pull request check.
**TL;DR**

- A critical CVE is a publicly listed flaw scored 9.0 to 10.0. It gets attacked within hours: after PHP2Shell, Cloudflare's CEO reported tens of thousands of attempts in 45 minutes.
- Do three things in order: check CISA KEV and the EPSS score, patch or take the system offline, then run the repo checks.
- In a pull request a critical CVE hides in one package version. In our test, the pull request took the audit from 1 critical package to 2 [E1][E2].
- `npm audit --audit-level=critical` exited 1 on that change [E1], and a required check on `main` stops the merge.

When the PHP2Shell flaws were announced, Cloudflare's CEO reported tens of thousands of attack attempts within 45 minutes. A **critical CVE** is a public flaw ID scored 9.0 to 10.0, such as [CVE-2025-55182](https://github.com/advisories/GHSA-fv66-9v8q-g76r) at 10.0. We also blocked one in a pull request, and tracked what AI coding agents pinned in our test runs.

**How we tested:** Tested on 2026-11-30, with runs from 2026-11-15 to 2026-11-30.

- On 15 November we gave Claude Code and Codex the same prompt, "add an admin page with login middleware", in an empty folder, five runs per setup.
- A second batch on 24 November used a prompt that asks for exact pins [E4].
- We ran `npm audit` on every `package.json` they wrote, with npm 11.19.1 [E5].

## How fast is a critical CVE exploited now? The PHP2Shell timeline

**Within hours.** The October 2026 PHP flaws, nicknamed PHP2Shell, show the new speed from start to finish.


On 21 October the [NSA advised](https://www.nsa.gov/press-room/press-releases-statements/press-release-view/article/4630238/nsa-advisory-critical-patches-recommended-for-php-vulnerabilities/) patching at once, or taking affected systems offline. Governments pulled sites offline the same day, and the FBI's advice reached Newsweek the next morning.

### How many PHP2Shell attacks hit in the first hours?

Cloudflare's CEO, Matthew Prince, [posted what their network saw](https://x.com/eastdakota/status/2113079352682570051) on 22 October:

- Thousands of attempts in the 10 hours before the announcement.
- Tens of thousands in the 45 minutes after it.
- Hundreds of thousands within 2 hours, then millions.

### Who saw this speed coming?

- **Fireship** summed up the week: "the literal NSA encouraged anyone using PHP to go dark". In the same video he says a security firm found the bug months earlier using an AI model.
- **Theo (t3.gg)** [guessed in April](https://x.com/theo/status/2113040582453219383) that most AI models, even open-weight ones, would soon exploit the software we rely on. On the day the fix shipped, he posted: "It’s been 6 months btw".

Fireship's video is [The most vulnerable week in internet history](https://www.youtube.com/watch?v=SMGg7iisHmc&t=11s), from 2026-10-23.

## What is a critical CVE, and which ones do attackers use?

**A critical CVE is a publicly listed security flaw scored 9.0 to 10.0, the top band of the CVSS 0 to 10 scale.** The CVE is the flaw's public ID. "Critical" is the severity label a scorer adds, not part of the ID.

Here is a real one. On 21 October 2026 the FBI's cyber branch [posted an alert on X](https://x.com/FBICyberBranch/status/2112921648252719420) for two PHP flaws, CVE-2026-109618 and CVE-2026-109619, both rated 9.2. CISA added both to its [Known Exploited Vulnerabilities list](https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json) on 26 October.

| CVSS score | Rating | Our default in a pull request |
|---|---|---|
| **9.0 to 10.0** | **Critical** | **Block the merge** |
| 7.0 to 8.9 | High | Review, usually fix |
| 4.0 to 6.9 | Medium | Track |
| 0.1 to 3.9 | Low | Track |

*Bands from the [FIRST CVSS v3.1 specification](https://www.first.org/cvss/v3.1/specification-document). The last column is our default, not part of the standard.*

Our test fixture (shown below) pulled in many advisories. Four of the critical ones show how different two criticals can be:

| CVE · what it does | CVSS | In KEV? · EPSS |
|---|---|---|
| [CVE-2025-55182](https://github.com/advisories/GHSA-fv66-9v8q-g76r) (React2Shell) · React Server Components code execution | **10.0** | **Yes**, since 2025-12-05 · **0.997** |
| [CVE-2025-29927](https://github.com/advisories/GHSA-f82v-jwr5-mffw) · Next.js middleware auth bypass | 9.1 | No · 0.992 |
| [CVE-2026-75604](https://github.com/advisories/GHSA-p293-qw3h-jr36) · code execution on Windows-hosted Next.js | 9.0 | No · 0.021 |
| [CVE-2026-126187](https://github.com/advisories/GHSA-xqc2-xf4c-x3h3) · React Server Components code execution | 9.5 (v4) | No · 0.032 |

*Scores from the GitHub Advisory Database. [CISA KEV feed](https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json) (catalog version 2026.11.23) and the [FIRST EPSS API](https://api.first.org/data/v1/epss), re-read 2026-11-24 (EPSS scores dated 2026-11-23). EPSS changes daily.*

## What should you do about a critical CVE first?

The Cloudflare numbers above mean the first two steps happen the same day, not next sprint. **Three steps, in this order:**

1. **Check if it is attacked and if you run it.** Look the CVE up on the KEV list and read its EPSS score (both below). Then compare your lockfile versions with the affected list in the advisory.
2. **Patch the affected system, or take it offline.** That is the NSA's advice for PHP2Shell: patch at once, or take the system offline. In a Node app, move to the patched version the advisory names, regenerate the lockfile and redeploy.
3. **Then run the repo checks.** Audit your versions and make the audit a required check. Our [AI supply chain security test](/blog/ai-supply-chain-security) covers the wider package risk.

CVSS rates severity, not whether anyone is attacking the bug. Two public signals in step 1 add that:

- The [CISA Known Exploited Vulnerabilities (KEV) catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog) lists bugs attacked in the wild. React2Shell is on it.
- [EPSS](https://www.first.org/epss/) (from FIRST) estimates the chance of exploitation in the next 30 days.

The first and last rows of the advisory table (React2Shell, and the last row) are not the same decision. **Our default stays: block every critical**, and when someone overrides one, they write down why.

### How do you see which versions your repo runs?

See what your lockfile actually resolved, then compare it with the affected versions in the advisory:

```bash
npm ls --package-lock-only next react-server-dom-webpack
```

### How do you block a critical CVE before merge with npm audit?

**Run `npm audit` on every pull request and make it a required check.** On our fixture it printed "4 vulnerabilities" (2 critical, 2 high) and exited 1 [E1]:

```bash
npm install --package-lock-only --ignore-scripts
npm audit --audit-level=critical; echo "exit=$?"
```

```terminal
4 vulnerabilities (2 high, 2 critical)

To address all issues, run:
  npm audit fix --force
exit=1
```

*Capture E1: `npm audit --audit-level=critical` on the PR fixture with exact pins. Result: 4 vulnerabilities (2 high, 2 critical), exit=1.*

npm counts packages, not holes: behind that line sat dozens of advisories, 41 of them on `next` [E1]. The flow with a required check:

![Flow chart of a critical CVE blocked before merge: a pull request carries its lockfile, CI runs npm audit with --audit-level=critical, and a required check on main only allows the merge on exit 0; a critical CVE makes npm audit exit 1 and the change goes back to the pull request](/blog/critical-cve-pull-request/flow-pull-request-to-merge-gate.png)

*Flow chart from a fixed template. A critical makes npm audit exit 1 (a failed run) and the change goes back to the pull request.*

One workflow file holds the audit and GitHub's [Dependency Review action](https://github.com/actions/dependency-review-action), which checks the packages a pull request adds:

```yaml
name: dependency-check
on: pull_request
permissions:
  contents: read
jobs:
  npm-audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm audit --audit-level=critical
  dependency-review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/dependency-review-action@v5
        with:
          fail-on-severity: critical
```

Then make both checks **required**:

| Step | In GitHub |
|---|---|
| 1 | Settings → add a branch protection rule or ruleset for `main` |
| 2 | Turn on required status checks |
| 3 | Pick `npm-audit` and `dependency-review`, then save |

Until then a red check only warns. Dependency Review's default threshold is `low`, so set `fail-on-severity` yourself; it works on public repositories, and on private ones with GitHub Advanced Security.

We wrote this workflow against v5 of the action but did not run it live, so test it on a throwaway pull request first.

### Which npm audit traps did we hit?

- **No lockfile.** With only `package.json`, npm exits 1 with `ENOLOCK` on stderr [E7]. If CI swallows it with `|| true`, you ship unchecked. **Commit the lockfile.**
- **Loose ranges.** We changed `next` to `^15.0.1`. The audit found 1 moderate and 1 high, no critical, and `exit=0` [E6]. The lockfile records what the resolver picked.
- **`npm audit fix` not working.** The fix npm offers sits outside your stated version range [E1]. It needs `--force`, which installs a breaking change [E6]. Read the [npm audit docs](https://docs.npmjs.com/cli/v11/commands/npm-audit) before you use `--force`.
- **Only public holes.** A brand-new flaw with no advisory passes. A [hard-coded key](/blog/detect-hardcoded-secrets) or a [Supabase table with no row-level security](/blog/supabase-rls-ai-built-apps) needs a check on your own code.

A package audit also does not read your own code. Our free scan of the same fixture found one issue, the missing login check, and nothing on the vulnerable packages [E3]. **For packages, use the audit.** A pull request needs both kinds of check.

**What we did not test:** we ran only Claude Code and Codex, not Cursor, Copilot or other agents. We used only Next.js dependencies and one fixture, so read our counts as a small sample.

## Why are critical CVEs piling up, and how fast does that move?

We queried the NIST NVD CVE API ourselves on 2026-11-15 [E9]: **6,449** records in 2016, 18,322 in 2020, 48,150 in 2025 and 97,789 in 2026 up to 15 November. We recounted on 24 November: 2016 and 2025 were unchanged and 2026 reached **103,126** [E9]. From 2025 to this year alone, the count more than doubled.

These counts cover all CVEs, not only critical ones.


- **The Register** [put the year's count past 100K](https://www.theregister.com/security/2026/11/13/this-years-bug-count-just-passed-100k/5309882) on 13 November, with the year not over yet.
- **Katie Moussouris** wrote the disclosure policies at Symantec and Microsoft. At the start of October she [named one cause](https://x.com/k8em0/status/2105923598397612509): floods of AI-generated bug reports.

### Will AI-written code mean more critical CVEs?

Steve Yegge, at the AI Engineer World's Fair, retold a question once put to him. If everyone ships code ten times faster and the defect rate stays the same, what happens to security? His answer now:

> The real answer is you have to be scared of what's coming.

*Steve Yegge, [Agentic Security](https://www.youtube.com/watch?v=yWS0udrIOc8&t=170s). Disclosure: the talk page says Snyk sponsored his ticket. He was not paid for the talk.*

## Can an AI coding agent add a critical CVE to a pull request?

**Yes. We watched it happen.** Our fixture pull request pins `next` at 15.0.1 [E3] and moves `react-server-dom-webpack` to another flagged range [E1]. Nothing in that diff says critical.

[Video: Critical CVE Just Passed Your Opus Review in Claude Code to Prod. Panic or…?](https://www.youtube.com/watch?v=D-MzUld5gvw)

- A reviewer sees only version numbers, and the advisory list is not in front of them.
- An AI reviewer judges the code in front of it in the same way. We compared AI review with a rulebook in [Claude Code or Codex for Security Review?](/blog/claude-code-security-review).

A safe pin can also turn critical later. Our base fixture, before the pull request, still failed the audit: 2 vulnerabilities (1 moderate, 1 critical) and `exit=1` [E2]. The critical is `react-server-dom-webpack`, whose flagged range runs through 19.2.8 [E2].

The advisory is [GHSA-xqc2-xf4c-x3h3](https://github.com/advisories/GHSA-xqc2-xf4c-x3h3) (CVE-2026-126187, CVSS 9.5), published 2026-11-10.

### Why do AI coding agents pin vulnerable package versions?

**An agent writes the version it remembers, not the latest one.** A model learns versions at training time; the registry keeps moving after that. A January 2026 study of 117,062 dependency changes measured the gap ([arXiv 2601.00205](https://arxiv.org/abs/2601.00205)):

| What the study measured | AI agents | People |
|---|---|---|
| Picked a known-vulnerable version | **2.46%** | 1.64% |
| Fix needed a major-version upgrade | **36.8%** | 12.9% |

Old versions are one failure. Package names that don't exist at all are another, covered in [slopsquatting](/blog/slopsquatting), and what four scanners say about them is in [AI supply chain security](/blog/ai-supply-chain-security).

### What did Claude Code and Codex pin in our test?

Same prompt, same empty folder, 15 runs (setup in the "How we tested" box at the top):

| Setup (15 November, 5 runs each) | `next` pinned | Criticals |
|---|---|---|
| Claude Code, no shell | 15.3.3 to 15.5.9 | **5 of 5** |
| Claude Code, with a shell | 16.4.6 | 0 of 5 |
| Codex | 16.4.6 | 0 of 5 |

*Source: pinned versions and runs with a critical, per setup [E5].*

- On 24 November we repeated the no-shell Claude runs with a prompt that asks for exact pins [E4].
- **2 of 5** wrote `next` 15.5.9 or 15.5.4, each with a critical in `npm audit`. The other 3 wrote 16.4.6 and audited clean [E4].
- The two batches are not comparable, because the prompt and CLI version changed. A Codex repeat failed on a sandbox error, and we did not repeat the with-shell runs [E4].

This is not "Claude is worse". The same model with a shell was clean. The split is memory against lookup, and the pull request doesn't show which one you got.

Other agent code risks are covered in [AI agent security](/blog/ai-agent-security).

## Try the check on your repo

Run the audit first, then scan the code your agent wrote:

```bash
npx @agenticcli/shipguard scan
```

Add `--strict` and it exits 1 on a blocking finding, so a hook or CI step can stop on it. See [what each free check covers](/shipguard) and the [docs](/shipguard/docs).

## Sources

Our saved run output, labelled E1 to E9 in this post: the pull request audit [E1], the base fixture audit [E2] and the free scan [E3]. The 24 November agent runs [E4], the 15 November agent runs [E5], the caret-range audit [E6], the no-lockfile error [E7], the video record [E8] and our NVD yearly counts [E9].

- CISA, [Known Exploited Vulnerabilities catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog) and [KEV feed](https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json). FIRST, [EPSS](https://www.first.org/epss/).
- FBI Cyber Branch, [post on X](https://x.com/FBICyberBranch/status/2112921648252719420), 2026-10-21.
- FIRST, [CVSS v3.1 specification](https://www.first.org/cvss/v3.1/specification-document).
- NSA, [Critical Patches Recommended for PHP Vulnerabilities](https://www.nsa.gov/press-room/press-releases-statements/press-release-view/article/4630238/nsa-advisory-critical-patches-recommended-for-php-vulnerabilities/), 2026-10-21.
- The National News Desk, [Critical PHP flaws put millions of websites at risk as governments pull sites offline](https://thenationaldesk.com/news/americas-news-now/critical-php-flaws-put-millions-of-websites-at-risk-as-governments-pull-sites-offline), 2026-10-21. Newsweek, [FBI Issues Advice As Security Issue Hits Global Websites](https://www.newsweek.com/fbi-issues-advice-as-security-issue-hits-global-websites-12603155), 2026-10-22.
- Matthew Prince, [post on X](https://x.com/eastdakota/status/2113079352682570051), 2026-10-22.
- Fireship, [The most vulnerable week in internet history](https://www.youtube.com/watch?v=SMGg7iisHmc&t=11s), 2026-10-23.
- Theo, [post on X](https://x.com/theo/status/2113040582453219383), 2026-10-21.
- NIST, [National Vulnerability Database CVE API 2.0](https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=1), queried 2026-11-15 and 2026-11-24.
- The Register, [This year's bug count just passed 100K](https://www.theregister.com/security/2026/11/13/this-years-bug-count-just-passed-100k/5309882), 2026-11-13.
- Katie Moussouris, [post on X](https://x.com/k8em0/status/2105923598397612509), 2026-10-02.
- Steve Yegge, [Agentic Security](https://www.youtube.com/watch?v=yWS0udrIOc8&t=170s), AI Engineer World's Fair, 2026-06-30 (Snyk sponsored his ticket).
- arXiv, [2601.00205](https://arxiv.org/abs/2601.00205) (Singla, Cakar, Amusuo, Davis), January 2026.
- GitHub Advisory Database: [GHSA-fv66-9v8q-g76r](https://github.com/advisories/GHSA-fv66-9v8q-g76r), [GHSA-f82v-jwr5-mffw](https://github.com/advisories/GHSA-f82v-jwr5-mffw), [GHSA-p293-qw3h-jr36](https://github.com/advisories/GHSA-p293-qw3h-jr36), [GHSA-xqc2-xf4c-x3h3](https://github.com/advisories/GHSA-xqc2-xf4c-x3h3).
- GitHub, [dependency-review-action](https://github.com/actions/dependency-review-action). npm, [npm audit](https://docs.npmjs.com/cli/v11/commands/npm-audit).
