CVE-2022-0338: Improper Privilege Management in loguru

loguru Updated 02 Oct 2025

Summary

25/01/2022
Yes i
Moderate
4.3

CVE-2022-0338: Improper Privilege Management in Conda loguru prior to 0.5.3. Affects loguru across 2 version ranges.

< 0.5.3 < ea39375e62f9b8f18e2ca798a5c0fb8c972b7eaa

Fixed in ea39375e62f9b8f18e2ca798a5c0fb8c972b7eaa. How to fix ↓

Also tracked for

The same CVE-2022-0338 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Loguru is a Python logging library that provides a simple and intuitive interface for logging. It aims to make logging easier and more efficient by offering features like automatic file rotation, colorized output, and structured logging. However, versions prior to 0.5.3 are vulnerable to improper privilege management.

Vulnerability Detail

The vulnerability in loguru (prior to 0.5.3) is related to improper privilege management. This means that the library does not properly handle user privileges, allowing an attacker to escalate their privileges and perform unauthorized actions. This vulnerability can lead to various security risks, such as unauthorized access, data leakage, or even remote code execution.

How To Fix

Minimum fixed version

ea39375e62f9b8f18e2ca798a5c0fb8c972b7eaa

This is the first release that contains the fix.

pip install --upgrade "loguru==ea39375e62f9b8f18e2ca798a5c0fb8c972b7eaa"

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

Conclusion

In conclusion, the vulnerability in loguru (prior to 0.5.3) allows for improper privilege management, which can lead to unauthorized actions and potential security risks. It is crucial to update loguru to version 0.5.3 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for loguru →

Share this vulnerability

FAQ

Loguru is a Python logging library that provides an easy-to-use interface for logging in Python applications.

This vulnerability can allow an attacker to escalate their privileges and perform unauthorized actions, potentially leading to unauthorized access, data leakage, or remote code execution.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your Pipfile.lock file and Vulert will analyze it for any open-source vulnerabilities, including this one.

Currently, there is no known workaround for this vulnerability. It is recommended to update loguru to the latest version to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for loguru.

How To Fix

Minimum fixed version

ea39375e62f9b8f18e2ca798a5c0fb8c972b7eaa

This is the first release that contains the fix.

pip install --upgrade "loguru==ea39375e62f9b8f18e2ca798a5c0fb8c972b7eaa"

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