VYPR
Unrated severityNVD Advisory· Published May 6, 2019· Updated Aug 4, 2024

CVE-2019-3558

CVE-2019-3558

Description

Python Facebook Thrift servers would not error upon receiving messages with containers of fields of unknown type. As a result, malicious clients could send short messages which would take a long time for the server to parse, potentially leading to denial of service. This issue affects Facebook Thrift prior to v2019.02.18.00.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

24

Patches

Vulnerability mechanics

Root cause

"The `skip()` function silently returns when encountering an unknown field/element type, allowing malicious containers to cause excessive parsing time."

Attack vector

A malicious client sends a crafted Thrift message containing a container (list, set, map) whose element type field is set to an invalid or unknown type value. Because the server's `skip()` routine silently returns on unknown types, the server does not advance its read cursor properly and may loop indefinitely or spend excessive time attempting to parse the malformed container. This allows an attacker to cause a denial of service by sending a short message that triggers a long parse time on the server [ref_id=1].

Affected code

The vulnerability resides in the `skip()` function within the Thrift protocol layer. In the C++ implementation, the `default:` case of the `skip()` function in `TProtocol.cpp` simply returned without error when encountering an unknown type. In the Python implementation, the `skip()` method in `TProtocol.py` also silently returned for unknown types. The patch modifies both the C++ `skip()` function and the Python `skip()` method to throw a `TProtocolException` with `INVALID_DATA` when an unrecognized type is encountered [ref_id=1].

What the fix does

The fix adds a `throwInvalidSkipType()` method to `TProtocolException` and modifies the `skip()` function's default case to call it instead of silently returning. In the Python implementation, the `skip()` method's final `else` clause now raises a `TProtocolException` with `INVALID_DATA` for any unrecognized type. This ensures that when the server encounters an invalid field/element type during skipping, it immediately throws an exception and stops processing the malformed message, preventing the denial-of-service condition [ref_id=1].

Preconditions

  • networkThe attacker must be able to send Thrift protocol messages to the server.
  • configThe server must be running a version of Facebook Thrift prior to v2019.02.18.00.
  • inputThe attacker must craft a message with a container (list, set, or map) whose element type field is set to an invalid/unknown type value.

Generated on Jun 1, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.