Integer overflow in WebRTC (CVE-2026-78950)
The WebRTC API method setParameters accepts maxBitrate values outside the unsigned 32-bit range without throwing an error, and these values are stored in a signed 32-bit integer, causing undefined behaviour in C++. An attacker could potentially exploit this undefined behaviour to corrupt bandwidth calculations, though the report does not demonstrate a concrete exploit.
- Fix shipped in 4 months
Report description
RTCRtpSender.setParameters accepts maxBitrate > UINT32_MAX (MAX_SAFE_INTEGER, -1) without TypeError. WebIDL unsigned long spec violation. uint32→int32 cast is undefined behavior in C++.
Bug location
Where do you want to report your vulnerability?
Chrome VRP – Report security issues affecting the Chrome browser. See program rules
Which URL (or repository) have you found the vulnerability in?
The problem
Please describe the technical details of the vulnerability
Summary
RTCRtpSender.setParameters() accepts maxBitrate values exceeding the uint32 range without throwing TypeError, violating the WebIDL spec.
The WebRTC spec defines maxBitrate as WebIDL unsigned long, which maps
to uint32_t (0 to 4,294,967,295). Per WebIDL §3.2.5, converting values
outside this range should produce specific results:
- Values > 2^32 should be modulo-reduced (ToUint32)
- NaN should become 0
- Infinity should become 0 (via ToUint32)
However, the actual behavior shows these values are silently accepted and
the truncated/converted values are passed to the internal BitrateAllocator
where max_bitrate_bps is stored as std::optional<int> (signed 32-bit).
Tested Values
| Input | WebIDL ToUint32 | Stored as int32 | Expected | Actual |
|---|---|---|---|---|
| 4294967295 (UINT32_MAX) | 4294967295 | OVERFLOW (UB) | Accept | Accept |
| 4294967296 (UINT32_MAX+1) | 0 | 0 | Accept(0) | Accept |
| MAX_SAFE_INTEGER | 4294967295 | OVERFLOW (UB) | Accept(ff) | Accept |
| Infinity | 0 | 0 | Accept(0) | Accept |
| -1 | 4294967295 | OVERFLOW (UB) | Accept(ff) | Accept |
The critical issue is that std::optional<int> cannot hold 4,294,967,295.
Storing UINT32_MAX in a signed int32 is undefined behavior in C++.
Root Cause
In third_party/webrtc/api/rtp_parameters.h:
max_bitrate_bpsisstd::optional<int>(signed 32-bit)- WebIDL produces uint32 values up to 4,294,967,295
- Assigning uint32 > INT32_MAX to int is undefined behavior
- UBSan would flag: "value 4294967295 is outside the range of representable values of type 'int'"
Security Impact
- UndefinedBehavior in C++ can be exploited by compilers to optimize away safety checks
- The BitrateAllocator receives a corrupted max_bitrate value, potentially causing integer overflow in bandwidth calculations
- Multiple senders with UINT32_MAX maxBitrate: sum overflows both int32 and uint32 (3 × 4294967295 = 12,884,901,885)
Reproduction
- Open attached
v7_webidl_violation_poc.html - Wait for Phase 1 to complete
- Observe that values > UINT32_MAX are marked [!!!] ACCEPTED
- Phase 2 exercises these values with actual media flow
Suggested Fix
- Change
max_bitrate_bpsfromstd::optional<int>tostd::optional<uint32_t> - OR add range validation in Blink→WebRTC conversion: if (max_bitrate > INT32_MAX) reject with RangeError
Difference from CVE-2026-5912
CVE-2026-5912 is an integer overflow in SDP text parsing (ParseBandwidthLine). This finding is in the setParameters() API path, which is architecturally separate and was NOT addressed by the CVE-2026-5912 fix.
Form Field: Impact Analysis
The WebIDL unsigned long → C++ int32 type mismatch causes undefined behavior when maxBitrate values ≥ 2,147,483,648 are set via the JavaScript API.
Who can exploit: Any JavaScript running in a page with WebRTC access.
What they gain:
- Undefined behavior in the BitrateAllocator — compiler may optimize away subsequent safety checks
- Integer overflow when summing multiple senders' max_bitrate values
- Combined with the setParameters(Infinity) policy bypass (separate report), provides two independent ways to corrupt bandwidth state
This is a defense-in-depth issue: the type mismatch (uint32→int32) should be fixed regardless of whether an exploitable crash results, as undefined behavior in C++ is a security anti-pattern.
#### Impact analysis
The WebIDL unsigned long to C++ int32 type mismatch causes undefined behavior when maxBitrate values >= 2,147,483,648 are set via the JavaScript API.
Who can exploit: Any JavaScript running in a page with WebRTC access.
What they gain:
1. Undefined behavior in the BitrateAllocator — compiler may optimize away subsequent safety checks
2. Integer overflow when summing multiple senders' max_bitrate values (3 x 4294967295 = 12,884,901,885 — exceeds both int32 and uint32)
3. Combined with the setParameters(Infinity) policy bypass (separate report), provides two independent ways to corrupt bandwidth state
This is a defense-in-depth issue: the type mismatch (uint32 to int32) should be fixed regardless of whether an exploitable crash results, as undefined behavior in C++ is a security anti-pattern.
---
### The cause
#### What version of Chrome have you found the security issue in?
146.0.0.0 [stable] + 147.0.7727.55 [stable]
#### Is the security issue related to a crash?
No, it is not related to a crash.
#### Choose the type of vulnerability
Other
#### How would you like to be publicly acknowledged for your report?
Ashutosh
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the WebIDL unsigned long value is cast to a signed 32-bit integer without range validation, causing undefined behaviour when the value exceeds INT32_MAX.
Impact
The undefined behaviour could allow a compiler to optimise away safety checks and cause integer overflow in bandwidth calculations, but the report does not demonstrate a concrete exploit and describes it as a defence-in-depth issue.
What the attacker needed
JavaScript running in a page with WebRTC access
The fix
The max_bitrate_bps field should be changed to an unsigned 32-bit type, or range validation should reject values above INT32_MAX with a RangeError.
How it was found
- Open the attached proof-of-concept HTML file.
- Wait for Phase 1 to complete.
- Observe that values greater than UINT32_MAX are marked as accepted.
- Phase 2 exercises these values with actual media flow.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
WebRTC lets web pages send audio and video directly between browsers. A function that sets the maximum bitrate for a video stream should reject numbers that are too large, but it does not. The oversized number is then stored in a smaller signed integer, which is undefined behaviour in C++ and could lead to unexpected results.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.