CVE-2023-52728
Executive Summary
CVE-2023-52728 is a critical memory safety vulnerability in the Open Networking Foundation (ONF) SD-RAN project's onos-lib-go library, version 0.10.25. The flaw resides in the putBitString function, which fails to validate array bounds before writing data, leading to an index out-of-range condition. This can be exploited to cause a denial of service (DoS) via application crash or potentially memory corruption, depending on the runtime environment. The vulnerability has a CVSS score of 0.0 (unscored) and an EPSS score of 0.0%, indicating low exploitation likelihood in the wild, but the lack of a patch makes it a persistent risk for any system using this library.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the Go package github.com/onosproject/onos-lib-go. As a core dependency for SD-RAN components (e.g., ONOS, RAN Simulator), any application importing this package is at risk. The supply chain impact is significant because the library is used in network infrastructure software, and an unpatched version could be distributed via container images or binary releases. Organizations should audit their Go module dependencies for onos-lib-go versions <= 0.10.25 and consider forking or applying a manual bounds check patch.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Unscored by NVD)
- Attack Vector (AV): Network (likely, as SD-RAN components communicate over network)
- Attack Complexity (AC): Low
- Privileges Required (PR): None
- User Interaction (UI): None
- Scope (S): Unchanged
- Confidentiality (C): None
- Integrity (I): None
- Availability (A): High (due to crash potential)
- EPSS Score: 0.0% (low exploitation probability)
- Threat Level: Medium (due to unpatched status and potential for DoS)
Deep Dive & Mechanics
The vulnerability is in the putBitString function within the onos-lib-go library. This function is used to write a bit string (a sequence of bits) into a buffer. The root cause is a missing bounds check on the index used to write into the underlying byte array. When an attacker supplies a crafted input that specifies a bit offset or length that exceeds the buffer capacity, the function writes beyond the allocated memory, causing an index out-of-range panic in Go (which crashes the application) or, in some environments, memory corruption.
The vulnerable code path is triggered when processing SD-RAN protocol messages that contain bit string fields. An attacker can send a specially crafted network packet to an SD-RAN component that uses this library, causing the putBitString function to be called with attacker-controlled parameters. The lack of validation on the bitOffset or bitLength parameters leads to the out-of-bounds write.
Vulnerable vs. Patched Code
Vulnerable Code (onos-lib-go <= 0.10.25):
func putBitString(buf []byte, bitOffset uint, bitLength uint, value uint64) {
// No bounds check on bitOffset or bitLength
startByte := bitOffset / 8
endByte := (bitOffset + bitLength) / 8
// ... writes to buf[startByte] and buf[endByte] without checking capacity
}
Patched Code (Hypothetical fix):
func putBitString(buf []byte, bitOffset uint, bitLength uint, value uint64) error {
startByte := bitOffset / 8
endByte := (bitOffset + bitLength) / 8
if endByte >= uint(len(buf)) {
return fmt.Errorf("bit string exceeds buffer length")
}
// ... safe write
return nil
}
No official patch exists. The fix would require adding bounds checks before any write operation.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Target running SD-RAN software using
onos-lib-gov0.10.25 (e.g., ONOS, RAN Simulator). - Network access to the target's SD-RAN control interface (typically TCP/50051 for gRPC).
Exploit Concept:
- Identify a gRPC endpoint that accepts a message containing a bit string field (e.g.,
CellConfigorUEMessage). - Craft a protobuf message where the bit string field has a
bitOffsetorbitLengththat causesputBitStringto write beyond the buffer. - Send the malicious message to the target.
- Observe the target process crash (DoS) or potential memory corruption.
Example (Python with grpcio):
import grpc
import sdn_ran_pb2 as pb2
channel = grpc.insecure_channel('target:50051')
stub = pb2.SdRanStub(channel)
# Craft a message with a malicious bit string
msg = pb2.SomeMessage()
msg.bit_string.bit_offset = 1000000 # Out-of-range offset
msg.bit_string.bit_length = 64
msg.bit_string.value = 0xFFFFFFFFFFFFFFFF
try:
response = stub.SomeRpc(msg)
except grpc.RpcError as e:
print(f"RPC failed: {e.code()}")
Blue Team
Detection:
- Monitor for crashes in SD-RAN components (e.g., ONOS, RAN Simulator) with stack traces referencing
putBitString. - Use network monitoring to detect anomalous gRPC messages with unusually large bit offset/length values.
- Implement runtime memory safety checks (e.g., using Go's
-raceflag in development).
Mitigation:
- Isolate SD-RAN components in a segmented network.
- Apply strict input validation at the application layer (e.g., using a proxy or API gateway).
- If possible, fork the
onos-lib-golibrary and apply the bounds check patch manually.
Indicators of Compromise (IOCs)
- Network: gRPC messages with
bit_offset> 65535 orbit_length> 64 (unusual for SD-RAN). - Logs: Go panic logs containing
runtime error: index out of range [%d] with length %dand stack trace includingputBitString. - Process: Unexpected termination of
onos,ran-simulator, or other SD-RAN processes. - File: Core dumps from crashed processes.
Detection Engineering
YARA Rule
rule CVE_2023_52728_putBitString_Panic {
meta:
description = "Detects Go panic logs indicating CVE-2023-52728 exploitation"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2023-52728"
strings:
$panic = "runtime error: index out of range"
$func = "putBitString"
condition:
$panic and $func
}
Sigma Rule
title: CVE-2023-52728 - SD-RAN putBitString Out-of-Bounds Write
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects Go panic logs indicating exploitation of CVE-2023-52728
logsource:
product: linux
service: syslog
detection:
selection:
- "runtime error: index out of range"
- "putBitString"
condition: all of selection
falsepositives:
- Legitimate crashes due to other bugs
level: high
Suricata Rule
alert tcp any any -> any 50051 (msg:"CVE-2023-52728 SD-RAN putBitString Exploit Attempt"; flow:to_server; content:"|0a|"; depth:1; content:"|10|"; distance:0; within:2; content:"|18|"; distance:0; within:2; byte_test:2,>,65535,0,relative; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Upgrade
onos-lib-goto a version > 0.10.25 if a patched version becomes available. Currently, no patch exists. - Short-term: Fork the repository and manually add bounds checks to
putBitString(see patched code example). Rebuild all dependent components. - Long-term: Monitor the ONF SD-RAN project for official patches. Implement input validation for all gRPC messages at the application perimeter.
- Compensating Controls: Use Web Application Firewall (WAF) or API gateway to filter anomalous gRPC payloads. Enable process crash monitoring and alerting.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.