Arbitrary Code Execution Vulnerability in newlib Package

newlib Updated 02 Oct 2025

Summary

20/08/2024
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2024-30949: An issue in newlib v.4.3.0 allows an attacker to execute arbitrary code via the time unit scaling in the _gettimeofday function. Affects newlib versions < 4.4.0.20231231-2. Fixed in 4.4.0.20231231-2. 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

newlib is a C library intended for use on embedded systems. It provides a lightweight implementation of standard C library functions, making it suitable for resource-constrained environments. The library is widely used in various applications, including firmware and operating systems. However, a recent vulnerability has been identified that could allow attackers to exploit the library's time unit scaling functionality.

Vulnerability Detail

An issue in newlib version 4.3.0 allows an attacker to execute arbitrary code via the time unit scaling in the _gettimeofday function. This vulnerability arises from improper handling of time values, which could lead to unexpected behavior and potential exploitation. If successfully exploited, an attacker could gain unauthorized access to the system, leading to data breaches or system compromise.

How To Fix

Minimum fixed version

4.4.0.20231231-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade newlib

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

Workaround

As a temporary workaround, you may consider disabling the affected functionality or restricting access to the affected components until the package can be updated. However, this is not a permanent solution and should be addressed by applying the patch as soon as possible.

Conclusion

In summary, the newlib package has a vulnerability that allows for arbitrary code execution due to improper handling of time values in the _gettimeofday function. It is crucial to update to the patched version to mitigate this risk. Additionally, using tools like Vulert can help monitor for such vulnerabilities in your applications.

See every vulnerability recorded for newlib →

Share this vulnerability

FAQ

The urgency of this vulnerability is classified as unimportant, but it still poses a risk of arbitrary code execution.

The vulnerability affects newlib versions prior to 4.4.0.20231231-2.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If exploited, this vulnerability could allow an attacker to execute arbitrary code, potentially leading to unauthorized access and system compromise.

Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software using just a manifest file like package-lock.json.

Related vulnerabilities

Recent vulnerabilities recorded for newlib.

How To Fix

Minimum fixed version

4.4.0.20231231-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade newlib

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