Safeguard
Vulnerability Analysis•

CVE-2022-48620: Critical Buffer Overflow in libuev Before 2.4.1

CVE-2022-48620 is a critical (9.8) buffer overflow in the libuev event loop library before 2.4.1. Upgrade to 2.4.1 or later and check embedded builds.

Safeguard Security Team
3 min read

CVE-2022-48620 is a critical (CVSS 9.8) buffer overflow in uev, also called libuev, an event loop library written in C. The flaw is in its epoll_wait handling when maxevents is a large number. Versions before 2.4.1 are affected, so upgrade to 2.4.1 or later.

What's affected

The NVD description says uev (libuev) before 2.4.1 has a buffer overflow in epoll_wait if maxevents is a large number. The project's upstream issue, number 27, is titled Possible event buffer overrun, and the fix is in the comparison between tags v2.4.0 and v2.4.1. Fedora's package announcement list is also cited by the record, so distribution packages were updated too.

The NVD record was published on 12 January 2024. Treat 2.4.1 as the first fixed release. Distributions sometimes backport fixes without changing the upstream version number, so check your vendor's changelog rather than only the number.

How to check if you're exposed

On a system with pkg-config data installed, run pkg-config --modversion libuev. On Debian or Ubuntu use dpkg -l | grep -i uev, and on Fedora use rpm -q libuev. Anything below 2.4.1 needs attention.

Because libuev is a small C library, it is often built into other programs or vendored into a source tree. Search your repositories for the source files and for any statically linked copies in firmware or container images. Run your Safeguard scan or the free in-browser dependency scan at gold.safeguard.sh/scan against your manifests or SBOM to see whether this package is in your tree, including as a transitive dependency.

What to do now

  1. Find every use of libuev, including vendored copies and statically linked binaries.
  2. Upgrade to 2.4.1 or later, or install your distribution's patched package.
  3. Rebuild and redeploy every program that links the library statically.
  4. Check how the calling code chooses the maxevents argument, and keep it small and fixed.
  5. Add the library to your software inventory so future advisories match it.

Why it matters

CWE-120 is a classic buffer copy without checking the size of the input. Here the problem is tied to the maxevents value given to epoll_wait. When that number is large, the library can write more event records than its buffer holds, and the overflow lands past the end of the buffer.

The vector in the record is network with no privileges, which gives the 9.8 score, but whether a given program is remotely exposed depends on how it calls the library and whether an outsider can influence the value. That is the kind of question reachability analysis answers: the library may be present while the risky call path is never used. KEV is false.

Try it yourself

Click through it at your own pace, or open it full screen.

Quick check

Which version of libuev is fixed?

2.4.1. The upstream comparison between v2.4.0 and v2.4.1 contains the change.

Does every program using libuev have a remote bug?

Not necessarily. It depends on whether the program can be made to pass a large maxevents value. Check how it calls the library.

Sources

You can also run the free in-browser dependency scan at gold.safeguard.sh/scan to see which known vulnerabilities your dependencies carry.

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

We email you a link to confirm, and only then add you to the list. Unsubscribe in one click. Privacy

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.