AutoExtinguish: true across all 12 supported languages via http.MaxBytesReader / io.LimitReader, Read::take, readNBytes, and bounded stream caps.
Commercial boundary: ciphermap immunity scan, immunity extinguish --apply, immunity attest (CycloneDX 1.6 CISA IBOM & OpenVEX 0.2.0), and ciphermap mcp require Tier B Enterprise Fleet. Offline proof and IBOM verification (--verify-proof, attest --verify) and the ciphermap demo sandbox run Free.
Unbounded Stream or Payload Allocation Across Polyglot Boundaries
Severity: HIGH
Reading an untrusted network, request, archive, or IPC stream into memory without an explicit byte ceiling allows a single oversized payload or decompression bomb to exhaust process heap memory (OOM denial-of-service). Enforce explicit byte caps across Go, TypeScript, JavaScript, Python, Java, Kotlin, C#, Rust, C/C++, Ruby, PHP, and Swift so oversized inputs fail closed before unbounded allocation.
Remediation checklist
- Go: wrap HTTP request bodies with http.MaxBytesReader(w, r.Body, maxBytes) or wrap generic io.Reader streams with io.LimitReader(r, maxBytes+1) and reject len(data) > maxBytes.
- TypeScript & JavaScript: enforce an explicit maxBytes accumulator guard when reading ReadableStreams, req.arrayBuffer(), or Node 'data' chunks; Python: pass an explicit byte cap to stream.read(MAX_BYTES + 1) and reject len(buf) > MAX_BYTES.
- Java & Kotlin: use InputStream.readNBytes(MAX_BYTES + 1) instead of readAllBytes() / readBytes(); C#: enforce MaxRequestBodySize or bounded Stream/PipeReader buffers; Rust: wrap Read/AsyncRead with reader.take(MAX_BYTES + 1) before read_to_end/read_to_string.
- C/C++: read fixed-ceiling buffers via istream::read / recv with explicit byte bounds; Ruby: call io.read(MAX_BYTES + 1) and check bytesize; PHP: pass maxlength to stream_get_contents($s, MAX_BYTES + 1) or file_get_contents('php://input', false, null, 0, MAX_BYTES + 1); Swift: use FileHandle.read(upToCount: maxBytes + 1).
Illustrative Code Examples
These fragments explain migration direction. They are not complete applications or compiler-verified patches for your project.
Vulnerable — unbounded request/stream reads (Go / Python / PHP)
// Go: unbounded io.ReadAll on attacker-controlled body
data, err := io.ReadAll(r.Body)
# Python: unbounded .read() on request stream
payload = request.stream.read()
// PHP: unbounded php://input read
$raw = file_get_contents('php://input');Remediated — explicit byte ceilings with fail-closed rejection
// Go: 1 MiB ceiling via http.MaxBytesReader
r.Body = http.MaxBytesReader(w, r.Body, 1<<20)
data, err := io.ReadAll(r.Body)
# Python: 10 MiB ceiling + fail-closed check
payload = request.stream.read(10_485_761)
if len(payload) > 10_485_760:
raise ValueError("payload exceeds limit")Preview remediation proposals
Preview proposed changes free with ciphermap fix . --dry-run --offline --no-telemetry. Eligibility depends on the installed build, call shape, module format, and migration context. The bundled RSA fixture has a classical key-size candidate; that does not make it post-quantum secure. Persisted digests and unsupported contexts may be declined. Applying supported candidates requires an entitlement, explicit verifier consent, and the required project tools. Review the actual verification result before adopting a change.
View DevSecOps pricingOther rule families
Quantum-Vulnerable Public Key (RSA / DSA / DH)
PQC-GO-AST-003Quantum-Vulnerable Elliptic Curves (ECC) & Pre-Standard PQC Drafts
PQC-GO-AST-001Deprecated & Broken Cryptographic Primitives
IMM-SQLI-001Dynamic SQL String Interpolation or Concatenation Across Polyglot Drivers
IMM-PATH-001Unjailed Filesystem Path Traversal or Symlink Escape Across Polyglot I/O
IMM-CMD-001Dynamic Shell Command Execution Across Polyglot Process APIs
IMM-DESER-001Unsafe Polymorphic Deserialization or Permissive Boundary Decoding
IMM-AUTH-001Unauthenticated or Unguarded State-Mutating Boundary Endpoint