CVE-2024-40465: Beego privilege escalation vulnerability

github.com/beego/beego/v2 Updated 02 Oct 2025

Summary

31/07/2024
Yes i
High
8.8

CVE-2024-40465: Beego privilege escalation vulnerability. Affects github.com/beego/beego/v2 versions < 2.2.1. Fixed in 2.2.1. 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

Beego is a Go web application framework that provides a simple and elegant way to build web applications. It offers features such as routing, middleware, and session management. The vulnerability affects beego version 2.2.0 and earlier. This vulnerability allows a remote attacker to escalate privileges by exploiting the getCacheFileName function in the file.go file.

Vulnerability Detail

The vulnerability arises from a flaw in the getCacheFileName function of beego. By exploiting this flaw, an attacker can gain elevated privileges. This can lead to unauthorized access, data manipulation, or even a complete compromise of the affected system. The vulnerability has a CVSS score of 8.8, indicating a high severity level.

How To Fix

Latest published version: v2.3.10 as of 23 Oct 2026

go get github.com/beego/beego/v2@v2.3.10

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.2.1

This is the first release that contains the fix.

go get github.com/beego/beego/v2@v2.2.1

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

Workaround

There is no known workaround for this vulnerability. It is crucial to update to the patched version of beego to mitigate the risk.

Conclusion

The beego privilege escalation vulnerability (CVE-2024-40465) allows a remote attacker to gain elevated privileges by exploiting a flaw in the getCacheFileName function. To mitigate this vulnerability, it is essential to update to beego version 2.2.1 or later. Failure to do so may result in unauthorized access, data manipulation, or a complete compromise of the affected system.

See every vulnerability recorded for github.com/beego/beego/v2 →

Share this vulnerability

FAQ

Beego is a Go web application framework that simplifies the process of building web applications. It provides features such as routing, middleware, and session management.

This vulnerability allows a remote attacker to escalate privileges, potentially leading to unauthorized access, data manipulation, or a complete compromise of the affected system.

The CVSS score of this vulnerability is 8.8, indicating a high severity level.

To fix this vulnerability, it is recommended to upgrade to beego version 2.2.1 or later.

There is no known workaround for this vulnerability. It is crucial to update to the patched version of beego to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/beego/beego/v2.

How To Fix

Latest published version: v2.3.10 as of 23 Oct 2026

go get github.com/beego/beego/v2@v2.3.10

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.2.1

This is the first release that contains the fix.

go get github.com/beego/beego/v2@v2.2.1

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