CVE-2022-24770: Improper Neutralization of Formula Elements in a CSV File in Gradio Flagging

gradio Updated 02 Oct 2025

Summary

18/03/2022
Yes i
High
8.8

CVE-2022-24770: Improper Neutralization of Formula Elements in a CSV File in Gradio Flagging. Affects gradio versions < 2.8.11. Fixed in 2.8.11. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Gradio is an open-source library that provides a simple interface for creating customizable UI components for machine learning models. It allows developers to quickly build interactive interfaces for their models, enabling users to input data and visualize the model's output. Gradio includes a flagging functionality that saves input/output data into a CSV file on the developer's computer. This feature is intended to help developers analyze and debug their models. However, a vulnerability in this functionality allows an attacker to save arbitrary text, including commands, into the CSV file. If the file is opened with a program like MS Excel, these commands can be automatically executed, leading to arbitrary command execution on the user's computer.

Vulnerability Detail

The vulnerability in Gradio's flagging functionality arises from the lack of proper neutralization of formula elements in a CSV file. When saving data to the CSV file, the library does not escape the text, allowing arbitrary commands to be injected. If a user opens the CSV file with a program like MS Excel, the commands are automatically executed, potentially leading to unauthorized actions on the user's computer. The impact of this vulnerability can be severe, as it allows an attacker to execute arbitrary commands with the privileges of the user running the program.

How To Fix

Latest published version: 6.30.0 as of 22 Oct 2026

pip install --upgrade "gradio==6.30.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.8.11

This is the first release that contains the fix.

pip install --upgrade "gradio==2.8.11"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating to the latest version of Gradio is not possible, users can mitigate the risk by avoiding opening CSV files generated by Gradio with programs like MS Excel or similar spreadsheet applications. Instead, they should use a text editor or a specialized CSV viewer that does not automatically execute commands.

Conclusion

The vulnerability in Gradio's flagging functionality allows an attacker to inject arbitrary commands into a CSV file, which can be automatically executed when opened with programs like MS Excel. This can lead to unauthorized command execution on the user's computer. It is recommended to update Gradio to version 2.8.11 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for gradio →

Share this vulnerability

FAQ

Gradio is an open-source library that provides a simple interface for creating customizable UI components for machine learning models.

The flagging functionality in Gradio allows developers to save input/output data into a CSV file for analysis and debugging purposes.

The vulnerability arises from the lack of proper neutralization of formula elements in the CSV file. This allows an attacker to inject arbitrary commands that can be automatically executed when the file is opened with programs like MS Excel.

The impact of this vulnerability can be severe, as it allows an attacker to execute arbitrary commands with the privileges of the user running the program.

To fix the vulnerability, update your Gradio installation to version 2.8.11 or later.

Related vulnerabilities

Recent vulnerabilities recorded for gradio.

How To Fix

Latest published version: 6.30.0 as of 22 Oct 2026

pip install --upgrade "gradio==6.30.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.8.11

This is the first release that contains the fix.

pip install --upgrade "gradio==2.8.11"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback