CVE-2023-24535

7.5 HIGH

📋 TL;DR

This vulnerability in the Go protobuf library causes a panic when parsing malformed text-format messages containing a minus sign followed by whitespace with no further input. This affects any Go application using the vulnerable protobuf library to parse untrusted text-format messages, potentially leading to denial of service.

💻 Affected Systems

Products:
  • Go applications using golang/protobuf library
Versions: All versions before the fix
Operating Systems: All platforms running Go applications
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects text-format protobuf parsing, not binary format. Applications must parse untrusted input to be vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption through denial of service, potentially cascading to dependent systems if the panic isn't properly handled.

🟠

Likely Case

Service crashes or becomes unresponsive when processing malicious input, requiring restart and causing temporary downtime.

🟢

If Mitigated

Minimal impact if proper input validation and panic recovery mechanisms are implemented.

🌐 Internet-Facing: HIGH - Internet-facing services parsing untrusted protobuf messages are directly vulnerable to DoS attacks.
🏢 Internal Only: MEDIUM - Internal services could be affected by malicious internal actors or accidental malformed input.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploit is trivial - send malformed text-format protobuf message with minus sign and whitespace. Public PoC exists in GitHub issues.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in golang/protobuf library updates

Vendor Advisory: https://pkg.go.dev/vuln/GO-2023-1631

Restart Required: Yes

Instructions:

1. Update Go protobuf library to patched version
2. Update application dependencies
3. Rebuild and redeploy application
4. Restart affected services

🔧 Temporary Workarounds

Input validation filter

all

Reject or sanitize text-format protobuf messages containing suspicious patterns before parsing

Implement pre-parsing validation to detect minus-whitespace patterns

Panic recovery wrapper

all

Wrap protobuf parsing calls with panic recovery to prevent service crashes

defer func() { if r := recover(); r != nil { log.Printf("Recovered from panic: %v", r) } }()

🧯 If You Can't Patch

  • Implement strict input validation to reject malformed protobuf messages
  • Deploy rate limiting and WAF rules to block suspicious patterns

🔍 How to Verify

Check if Vulnerable:

Check if application uses golang/protobuf library and parses untrusted text-format messages

Check Version:

go list -m all | grep protobuf

Verify Fix Applied:

Test with malformed input containing minus sign and whitespace - should not panic

📡 Detection & Monitoring

Log Indicators:

  • Panic logs mentioning protobuf parsing
  • Service crash/restart logs
  • Error logs with stack traces

Network Indicators:

  • Incoming requests with malformed protobuf content
  • Patterns matching minus-whitespace in payloads

SIEM Query:

source="application.logs" AND ("panic" OR "crash") AND "protobuf"

🔗 References

📤 Share & Export