CVE-2018-8073: yii2-redis Potential Remote code execution

yiisoft/yii2-redis Updated 02 Oct 2025

Summary

14/05/2022
Yes i
Critical
9.8

CVE-2018-8073: yii2-redis Potential Remote code execution. Affects yiisoft/yii2-redis versions < 2.0.8. Fixed in 2.0.8. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The yii2-redis package is a Redis extension for the Yii framework, which provides an ActiveRecord implementation for Redis. It allows developers to interact with Redis databases using Yii's ActiveRecord pattern. Redis is an open-source in-memory data structure store that can be used as a database, cache, and message broker. It is commonly used for caching and session storage in web applications.

Vulnerability Detail

The vulnerability identified as CVE-2018-8073 in the yii2-redis package allows for potential remote code execution in the LUA context of the Redis server. This vulnerability can be exploited through the methods yii\redis\ActiveRecord::findOne() and yii\redis\ActiveRecord::findAll(). Attackers who can access these methods can manipulate data on the Redis server, potentially leading to unauthorized access, data corruption, or other malicious activities.

How To Fix

Minimum fixed version

2.0.8

This is the first release that contains the fix.

composer require yiisoft/yii2-redis:2.0.8

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

Workaround

If upgrading the yii2-redis package is not immediately feasible, a possible workaround is to restrict access to the vulnerable methods (yii\redis\ActiveRecord::findOne() and yii\redis\ActiveRecord::findAll()) by implementing custom access controls or by temporarily disabling the affected functionality. However, this workaround should be considered temporary, and upgrading to the latest secure version of the package is strongly recommended.

Conclusion

The yii2-redis package is vulnerable to potential remote code execution in the LUA context of the Redis server. This can be exploited through the methods yii\redis\ActiveRecord::findOne() and yii\redis\ActiveRecord::findAll(), allowing attackers to manipulate data on the Redis server. To mitigate this vulnerability, it is recommended to upgrade the package to version 2.0.8 or later. Alternatively, access to the vulnerable methods can be restricted or temporarily disabled. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for yiisoft/yii2-redis →

Share this vulnerability

FAQ

The vulnerability allows attackers to execute arbitrary code in the LUA context of the Redis server. This can lead to unauthorized access, data manipulation, or other malicious activities.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. The playground allows you to analyze your composer.lock file and provides real-time alerts for open-source vulnerabilities.

At the time of this report, there are no known public exploits specifically targeting this vulnerability. However, it is important to address the vulnerability promptly to prevent potential exploitation.

While upgrading to the latest secure version of the yii2-redis package is the recommended solution, you can temporarily mitigate the vulnerability by implementing custom access controls or by disabling the affected functionality. However, these measures should be considered temporary, and upgrading the package should be prioritized.

You can find more information about the vulnerability in the GitHub Advisory Database (https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/05/GHSA-4hx3-m8w5-g5qh/GHSA-4hx3-m8w5-g5qh.json). This includes the source of the vulnerability and the fixed version of the package.

Related vulnerabilities

Recent vulnerabilities recorded for yiisoft/yii2-redis.

How To Fix

Minimum fixed version

2.0.8

This is the first release that contains the fix.

composer require yiisoft/yii2-redis:2.0.8

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