TensorFlow boosted trees can crash or allow memory access outside bounds

CriticalSE Fix-First Score 51/100GHSA-h6gw-r52c-724rSE-AIV-00463Denial of service and resource exhaustionModel serving and inferenceMade public 10 Feb 2022

Download as PDF

What this means

An attacker who can send input to a TensorFlow boosted trees API can crash the service, causing downtime. They may also read or write data in the computer's memory that they should not have access to, potentially exposing sensitive information or corrupting the application.

SecurityElites Manager Brief: the decision in one minute

TensorFlow boosted trees have critical bugs that let attackers crash your service or access memory illegally. You must upgrade to version 2.5.3, 2.6.3, 2.7.1 or later immediately, or switch to TensorFlow Decision Forests and remove boosted trees APIs from your code. Upgrading takes about an hour per service.

SecurityElites Fix-First Score51 of 100
Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity.
SecurityElites fix windowWithin 7 days
Critical severity. This is our suggestion from common practice; your own policy comes first.
Who should own the fixMachine learning or data science team, with support from DevOps or infrastructure.
Likely effortAbout 30 minutes to 2 hours per machine: checking which version is installed, upgrading to the fixed version, restarting the service, and testing. It may take longer if you are using many machines or if you need to switch to a different library.

Questions to ask your team or supplier

  • Do we have a list of all services and machines running TensorFlow boosted trees, and which versions they are on?
  • Are any of our boosted trees APIs or models exposed to untrusted input or external users?
  • If we cannot upgrade immediately, what is the business impact of disabling boosted trees APIs until we can patch?

Message you can forward to the owning team

Security notice: TensorFlow boosted trees can crash or allow memory access outside bounds (GHSA-h6gw-r52c-724r)

Severity: Critical
SecurityElites Fix-First Score: 51 of 100
SecurityElites fix window: Within 7 days
Action: upgrade to tensorflow 2.7.1, tensorflow-cpu 2.7.1, tensorflow-gpu 2.7.1 or later.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/ghsa-h6gw-r52c-724r-tensorflow-boosted-trees-can-crash-or-allow-memory-access/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-00463

What is at stake in your AI setup

  • Boosted trees models: could be corrupted or deleted by an attacker who exploits this vulnerability.
  • Training data or feature data used by boosted trees: could be read or corrupted via memory access outside bounds.
  • Any other models or data in memory on the same machine: could be read or corrupted if an attacker exploits this to access adjacent memory.

Map where your company uses AI

Who is exposed

  • Teams running TensorFlow versions before 2.5.3, or 2.6.x before 2.6.3, or 2.7.0
  • Services that accept boosted trees API calls from untrusted users
  • Data pipelines using TensorFlow boosted trees for model training or serving
  • Systems where TensorFlow is installed via PyPI as tensorflow, tensorflow-cpu, or tensorflow-gpu

Upgrades you need

SoftwareAffected versionsMove to
tensorflow
PyPI
Every version before 2.5.3; 2.6.0 up to, but not including, 2.6.3; 2.7.0 up to, but not including, 2.7.12.7.1 or later
tensorflow-cpu
PyPI
Every version before 2.5.3; 2.6.0 up to, but not including, 2.6.3; 2.7.0 up to, but not including, 2.7.12.7.1 or later
tensorflow-gpu
PyPI
Every version before 2.5.3; 2.6.0 up to, but not including, 2.6.3; 2.7.0 up to, but not including, 2.7.12.7.1 or later

Each maintained branch has its own fixed version. Stay on your branch if you cannot jump to the newest: tensorflow 2.5.3, 2.6.3, 2.7.1; tensorflow-cpu 2.5.3, 2.6.3, 2.7.1; tensorflow-gpu 2.5.3, 2.6.3, 2.7.1.

Am I affected?

Enter the version you run. Nothing you type is stored.

SecurityElites Developer Brief: the technical picture

Where the attacker must beAlready on the machine, or able to get a user to open something on it
Account neededNone. No login is needed
Does a person have to do somethingNo. It works without anyone clicking or opening anything
How hard it is to doEasy. It works reliably once the attacker can reach it
Risk of: data being readHigh
Risk of: data or settings being changedHigh
Risk of: the service being taken downHigh

Read from the official severity rating: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Kind of coding mistake

  • CWE-476: a missing value crashes the program
  • CWE-824

Where it sits in the standards

OWASP Top 10 for LLM Applications 2025: LLM10 Unbounded Consumption

If you cannot upgrade today

  • Until you can upgrade, do not expose boosted trees APIs to untrusted users. If the service must remain running, disable or restrict access to boosted trees endpoints to only trusted internal systems.
  • If you are using boosted trees for training or batch jobs, run them in isolated environments (containers, separate machines) so that a crash does not affect other services.

Signs it may already have been used against you

  • Search logs for crashes or segmentation faults in tensorflow/core/kernels/boosted_trees code.
  • Look for nullptr dereference errors or CHECK-failure messages from TensorFlow boosted trees during the time period before the upgrade.
  • Review error or exception logs for any mentions of heap or memory access errors that coincide with calls to boosted trees APIs.
  • Check process restart logs or container exit codes for unusual terminations of services that use TensorFlow boosted trees, especially if they happened after receiving external input.

SecurityElites Fix Guide: step by step

  1. Find where TensorFlow is installedList all Python environments and virtual environments in use. Run `pip list | grep tensorflow` or `pip3 list | grep tensorflow` in each environment. Record the package name (tensorflow, tensorflow-cpu, or tensorflow-gpu) and the version number for each.
  2. Check which versions are affectedIf you have tensorflow, tensorflow-cpu, or tensorflow-gpu version 2.5.0 to 2.5.2, any 2.6.x version before 2.6.3, or version 2.7.0, the system is affected. If you have 2.5.3, 2.6.3, 2.7.1 or later, or 2.8.0 or later, the system is not affected.
  3. Decide on a fix strategyChoose one: upgrade to the fixed version (2.5.3, 2.6.3, 2.7.1 or later), or stop using boosted trees APIs and migrate to TensorFlow Decision Forests. Upgrading is faster if you are not ready to migrate. Write down which services use boosted trees so you know what to test after the upgrade.
  4. Upgrade TensorFlow to a fixed versionIf upgrading: in each Python environment, run `pip install --upgrade tensorflow==2.7.1` (or 2.6.3 or 2.5.3 if you are on an older major version). If migrating: follow the TensorFlow Decision Forests documentation to install it and update your code to use the new library instead of boosted trees.
  5. Restart services that use TensorFlowStop and restart each service, container, or worker that imports or uses TensorFlow. This may include model serving endpoints, training jobs, and batch processing pipelines. Wait for each to start cleanly.
  6. Verify the fix is in placeIn each Python environment, run `python -c "import tensorflow; print(tensorflow.__version__)"` and confirm the version is 2.5.3, 2.6.3, 2.7.1, or later. For each affected service, check that it starts and runs without errors, and that boosted trees models (if still in use) load and produce output.
  7. Check for signs of past attacksReview error logs and metrics from before the upgrade for any unusual crashes, `nullptr` dereference errors, or unexpected memory behavior in TensorFlow boosted trees code. Look for spikes in process crashes or restarts that coincide with requests to boosted trees APIs. If found, investigate whether untrusted input was sent to these APIs.
  8. Plan to migrate away from boosted treesEven after upgrading, make a plan to migrate to TensorFlow Decision Forests over the next few months, since TensorFlow's boosted trees APIs are unmaintained and will be removed in a future release. Document which models and services use boosted trees so you can prioritize the migration.

How to confirm it is fixed: Run `python -c "import tensorflow; print(tensorflow.__version__)"` in each environment and confirm the version is 2.5.3, 2.6.3, 2.7.1 or later; also start each affected service and confirm it runs without errors.

SecurityElites Quick Fixes: copy and paste

Upgrade tensorflow with pipupgrade

pip install --upgrade "tensorflow>=2.7.1"
pip show tensorflow | grep Version

Pin it in requirements.txtupgrade

tensorflow>=2.7.1

Upgrade tensorflow-cpu with pipupgrade

pip install --upgrade "tensorflow-cpu>=2.7.1"
pip show tensorflow-cpu | grep Version

Pin it in requirements.txtupgrade

tensorflow-cpu>=2.7.1

Upgrade tensorflow-gpu with pipupgrade

pip install --upgrade "tensorflow-gpu>=2.7.1"
pip show tensorflow-gpu | grep Version

Pin it in requirements.txtupgrade

tensorflow-gpu>=2.7.1

Check installed TensorFlow version in Pythonfor this issue

import tensorflow
print(tensorflow.__version__)

Check TensorFlow version via pip commandfor this issue

pip show tensorflow tensorflow-cpu tensorflow-gpu | grep Version

Rate and size limits with nginxgeneral hardening

limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;

server {
    location /api/ {
        limit_req zone=api burst=20 nodelay;
        client_max_body_size 2m;
    }
}

Test in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.

Let your AI coding assistant do the upgrade

Paste this into the coding assistant you already use, inside the project. It checks first and asks before it changes anything.

Instruction for your coding assistant

You are helping me fix a security vulnerability (GHSA-h6gw-r52c-724r) in this project.\n\n1. Search the whole repository, including lock files, container files and CI configuration, for these packages and list every place they are pinned or installed:\n   - tensorflow (PyPI): must be 2.7.1 or later
   - tensorflow-cpu (PyPI): must be 2.7.1 or later
   - tensorflow-gpu (PyPI): must be 2.7.1 or later
2. Tell me which version we use now and whether it is affected. Stop and ask me before changing anything.
3. After I agree, raise each one to the safe version, update the lock files, and keep every other dependency as it is.
4. Run the tests and tell me what failed.
5. Give me a short summary of the files you changed that I can put in the pull request.

SecurityElites Incident Drill: could your team handle this?

Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.

What versions of TensorFlow are affected by this vulnerability?A good answer: Any version before 2.5.3, any 2.6.x version before 2.6.3, and version 2.7.0; versions 2.5.3, 2.6.3, 2.7.1 and later are fixed.
What are the two main ways to fix this?A good answer: Upgrade TensorFlow to 2.5.3, 2.6.3, 2.7.1 or later, or migrate to TensorFlow Decision Forests and stop using the boosted trees APIs.
What could an attacker do if they can send input to a boosted trees API?A good answer: They could crash the service, read sensitive data from memory, or corrupt data in memory that the application uses.
What is the recommended long-term strategy for boosted trees?A good answer: Migrate to TensorFlow Decision Forests because TensorFlow's boosted trees implementation is unmaintained and will be removed in a future release.

Run a full timed drill with your team

Ticket for your backlog

Paste into Jira, GitHub Issues or any tracker that reads Markdown.

Ready-made ticket

## TensorFlow boosted trees can crash or allow memory access outside bounds (GHSA-h6gw-r52c-724r)

**Severity:** Critical  |  **SE Fix-First Score:** 51/100  |  **Fix window:** Within 7 days
**Record:** SE-AIV-00463 https://securityelites.com/ai-vulnerabilities/ghsa-h6gw-r52c-724r-tensorflow-boosted-trees-can-crash-or-allow-memory-access/

### Why this matters
An attacker who can send input to a TensorFlow boosted trees API can crash the service, causing downtime. They may also read or write data in the computer's memory that they should not have access to, potentially exposing sensitive information or corrupting the application.

### What to do
1. Find where TensorFlow is installed
2. Check which versions are affected
3. Decide on a fix strategy
4. Upgrade TensorFlow to a fixed version
5. Restart services that use TensorFlow
6. Verify the fix is in place
7. Check for signs of past attacks
8. Plan to migrate away from boosted trees

Full steps: https://securityelites.com/ai-vulnerabilities/ghsa-h6gw-r52c-724r-tensorflow-boosted-trees-can-crash-or-allow-memory-access/

### Done when
- [ ] tensorflow is at 2.7.1 or later everywhere it is installed
- [ ] tensorflow-cpu is at 2.7.1 or later everywhere it is installed
- [ ] tensorflow-gpu is at 2.7.1 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Run `python -c "import tensorflow; print(tensorflow.__version__)"` in each environment and confirm the version is 2.5.3, 2.6.3, 2.7.1 or later; also start each affected service and confirm it runs without errors.
- [ ] Logs were checked for signs of earlier use

SecurityElites Fix Tracker

Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.

Sign in to track this fix

Change history

  • 9 Feb 2022: Made public
  • 2 Dec 2026: Published

Official record

### Impact The [code for boosted trees in TensorFlow](https://github.com/tensorflow/tensorflow/blob/e0b6e58c328059829c3eb968136f17aa72b6c876/tensorflow/core/kernels/boosted_trees/stats_ops.cc) is still missing validation. This allows malicious users to read and write outside of bounds of heap allocated data as well as trigger denial of service (via dereferencing `nullptr`s or via `CHECK`-failures).This follows after CVE-2021-41208 where these APIs were still vulnerable to multiple security issues.**Note**: Given that the boosted trees implementation in TensorFlow is unmaintained, it is recommend to no longer use these APIs. Instead, please use the downstream [TensorFlow Decision Forests](https://github.com/tensorflow/decision-forests) project which is newer and supports more features. These APIs are now deprecated in TensorFlow 2.8. We will remove TensorFlow's boosted trees APIs in subsequent releases. ### Patches We have patched the known issues in multiple GitHub commits. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.This should allow users to use existing boosted trees APIs for a while until they migrate to [TensorFlow Decision Forests](https://github.com/tensorflow/decision-forests), while guaranteeing that known vulnerabilities are fixed.### For more information Please consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions.### Attribution These vulnerabilities have been reported by Yu Tian of Qihoo 360 AIVul Team and Faysal Hossain Shezan from University of Virginia. Some of the issues have been discovered internally after a careful audit of the APIs.

Weakness type: CWE-476, CWE-824

Use this record in your own tools

Get this record as JSON

curl https://securityelites.com/wp-json/se-aivd/v1/vulns/GHSA-h6gw-r52c-724r

For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker

The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 2 Dec 2026. Read the vendor advisory before changing a production system.