Critical Vulnerability in Socat Package: Improper File Handling in readline.sh

socat Updated 02 Oct 2025

Summary

04/12/2024
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2024-54661: readline.sh in socat before1.8.0.2 relies on the /tmp/$USER/stderr2 file. Affects socat versions < 1.8.0.2-1. Fixed in 1.8.0.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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Socat is a command-line based utility that establishes two bidirectional byte streams and transfers data between them. It is widely used for network communication and data transfer. The package is known for its versatility and ability to handle various protocols. However, a vulnerability has been identified in versions prior to 1.8.0.2, which affects its handling of temporary files, potentially exposing sensitive information.

Vulnerability Detail

The vulnerability arises from the reliance on the /tmp/$USER/stderr2 file in the readline.sh script of socat versions before 1.8.0.2. This can lead to unauthorized access to sensitive data, as the file may not be securely managed, allowing attackers to exploit it. The issue is classified as unimportant in urgency but can still pose risks in environments where sensitive data is handled.

How To Fix

Minimum fixed version

1.8.0.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade socat

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

Workaround

As a temporary workaround, users can avoid using the readline.sh script or ensure that the /tmp directory is secured and not accessible to unauthorized users. However, updating to the patched version is strongly recommended for long-term security.

Conclusion

The socat package has a critical vulnerability related to improper file handling in its readline.sh script. Users are advised to update to version 1.8.0.2-1 or later to mitigate risks. Understanding and addressing this vulnerability is essential for maintaining the security of systems using socat.

See every vulnerability recorded for socat →

Share this vulnerability

FAQ

The vulnerability is related to improper file handling in the readline.sh script, which can expose sensitive information.

You can check your version of socat by running 'socat -V' in the terminal. If it is below 1.8.0.2, it is affected.

Yes, the vulnerability can potentially expose sensitive data if the temporary file is accessed by unauthorized users.

If an immediate update is not possible, consider securing the /tmp directory and avoiding the use of the readline.sh script.

More information can be found in the official Debian CVE database or by visiting the Vulert website for real-time monitoring of vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for socat.

How To Fix

Minimum fixed version

1.8.0.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade socat

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