# V8's Boolean Handling Broke My Constant-Time JavaScript Library

Original title: The V8 JavaScript Runtime Undermined My Constant-Time JavaScript Library

> Hacker News story 49669734 · language: en · submitted 2026-09-12
> Web version: https://zeli.app/story/49669734
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 20 · by [some_furry](<https://news.ycombinator.com/user?id=some_furry>) · 💬 11
[original](<https://soatok.blog/2026/09/12/the-v8-javascript-runtime-undermined-my-constant-time-javascript-library/>) · [HN discussion](<https://news.ycombinator.com/item?id=49669734>)

## Summary

A Ph.D. student disclosed a side-channel in Soatok's constant-time-js library: V8's ToBoolean and signed-zero handling leak secret-dependent cache behavior through true/false Oddball objects. Soatok verified the report, released version 0.5.0 with a patch, and requested a CVE. The fix avoids booleans entirely and sidesteps negate-and-mask patterns, but true constant-time guarantees remain elusive in JavaScript.

## Key quote

> Avoiding booleans is the only way to be safe.

## HN discussion (11 comments)

### [i2talics](<https://news.ycombinator.com/item?id=49701315>)

> I'm a security noob, but side channel attacks seem to me like something that you fundamentally just can't address by writing better software in a high-level language. The entire point is that they dig underneath all of your abstractions. It doesn't seem particularly tenable to keep playing whack-a-mole in this way.

### [ErikCorry](<https://news.ycombinator.com/item?id=49701495>)

> Nobody was evil you just tried to rely on a property that V8 never promised.
>
> Wasm doesn't promise it either but there's a much better chance you get what you want there.

### [ndesaulniers](<https://news.ycombinator.com/item?id=49701605>)

> I was working on reimplementing the WebRTC stack in JavaScript a long time ago, never finished. The crypto folks at Mozilla (ekr@) suggested "maybe don't do that for dTLS."

---

## Cite

- Page: https://zeli.app/story/49669734
- Date: 2026-09-12
- Source: soatok.blog (https://soatok.blog/2026/09/12/the-v8-javascript-runtime-undermined-my-constant-time-javascript-library/)
- Hacker News: https://news.ycombinator.com/item?id=49669734

## Other languages

- zh: https://zeli.app/zh/story/49669734 · markdown: https://zeli.app/zh/story/49669734.md
- ja: https://zeli.app/ja/story/49669734 · markdown: https://zeli.app/ja/story/49669734.md
- ko: https://zeli.app/ko/story/49669734 · markdown: https://zeli.app/ko/story/49669734.md
- de: https://zeli.app/de/story/49669734 · markdown: https://zeli.app/de/story/49669734.md
- es: https://zeli.app/es/story/49669734 · markdown: https://zeli.app/es/story/49669734.md
- ru: https://zeli.app/ru/story/49669734 · markdown: https://zeli.app/ru/story/49669734.md
