Cloudanix VulnDB

CVE-2016-2090

Critical · 9.8

CVSS

9.8

EPSS

3.2%

Published

Jan 13, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in a common support library used by some Git servers can let attackers take over the server if left unpatched.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Full Compromise
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Low
Patch risk
Low

What it actually does

Off-by-one error in fgetwln triggers a heap-based buffer overflow, enabling out-of-bounds memory writes and potential arbitrary code execution.

Why it matters to the business

Services relying on the affected library versions, including Git hosting platforms, face risk of remote compromise that can lead to data theft, service disruption, or supply-chain attacks across dependent environments.

How an attack unfolds

An attacker supplies crafted input that exercises the vulnerable fgetwln path, overflows the heap buffer, and gains control of execution flow to execute arbitrary code on the target system.

How to fix it

Upgrade libbsd to 0.8.2 or later. For listed products apply the exact fixes: gitlab (Bitnami) to 13.12.9 and om/cgit (GIT) to commit 8cc02871230aef457006ac775dd1cca5623516a9.

How to confirm the fix worked

Confirm the installed libbsd version is at least 0.8.2, verify product binaries reference the corrected commit, and re-run any unit tests that exercise fgetwln.

Typical attack path

  1. Identify a network-reachable service using the vulnerable library
  2. Craft and send input sized to trigger the off-by-one condition
  3. Overwrite adjacent heap structures to achieve code execution
  4. Establish persistence or exfiltrate data from the compromised process

How to detect it

Review process memory dumps and crash logs for repeated heap corruption patterns around line-buffered input handling; correlate with network logs showing unusual request sizes to services built on the vulnerable library.

What your security team should do

  • Prioritize patching internet-facing instances of affected Git services within 30 days
  • Add the library to the organization's software bill of materials and dependency scanning policy
  • Monitor upstream advisories for any newly published proof-of-concept code

The record

Off-by-one vulnerability in the fgetwln function in libbsd before 0.8.2 allows attackers to have unspecified impact via unknown vectors, which trigger a heap-based buffer overflow.

Affected packages

Ecosystem Package Introduced Fixed
Alpine:v3.2 libbsd 0 0.6.0-r2
Alpine:v3.3 libbsd 0 0.8.2-r0
Alpine:v3.4 libbsd 0 0.8.2
Debian:11 libbsd 0 0.8.2-1
Debian:12 libbsd 0 0.8.2-1
Debian:13 libbsd 0 0.8.2-1
Debian:8 libbsd 0 0.7.0-2+deb8u1
Ubuntu:16.04:LTS libbsd 0 0.8.2-1
Ubuntu:16.04:LTS libbsd 0 0.8.2-1ubuntu0.1
Ubuntu:18.04:LTS libbsd 0 0.8.7-1ubuntu0.1
Ubuntu:Pro:14.04:LTS libbsd 0 0.6.0-2ubuntu1+esm1

Related vulnerabilities