Changelog

denoland/deno · · 8 commits

Security hardening and UTF-16 fix

Deno tightened multiple symlink-sensitive filesystem paths, fixed diagnostic columns for UTF-16 text, and hardened prompt rendering against bidi spoofing.

Fix diagnostics to respect UTF-16 source columns (nathanwhit3f46264)

Deno now interprets runtime and TypeScript diagnostic positions as UTF-16 code-unit offsets, which matches what V8 and TypeScript report. This fixes misaligned underlines and incorrect source locations for non-BMP characters like emoji.

Harden temp node_modules creation against unsafe parent paths (nathanwhitbee9c4c)

Temporary node_modules setup now validates the temp root and dated directories before use, checks ownership and permissions on Unix, and falls back to a fresh temp directory if the preferred layout is unsafe. This closes off symlink and permissive-directory tricks that could redirect cleanup or writes outside the intended temp tree.

Reject symlinked npm materialization destinations (nathanwhit9ec3275)

Package hard-link/copy materialization now refuses symlinked destination directories instead of treating them like real directories. That prevents package files from being written through redirected paths.

Make native addon extraction use a dedicated cache dir (nathanwhit8b51f1a)

Native addons extracted from embedded runtimes are now written into a validated, owner-only cache directory instead of the general temp dir with deterministic filenames. The loader also rejects reused files that are symlinks, mismatched, or owned by another user, reducing the risk of path hijacking.

Escape bidi and invisible control marks in permission prompts (nathanwhit61057f6)

Permission prompts now visibly escape bidirectional formatting marks and other zero-width/invisible Unicode controls instead of rendering them directly. This prevents labels from being visually reordered or spoofed in security-sensitive prompts.

Other misc changes

  • Fixed Web Streams adapter error handling for Node stream polyfills (nathanwhitd48d5a4)
  • Rejected symlinked node_modules and .deno cleanup roots in deno clean (nathanwhit4e5de66)
  • Prevented npm lock poll updates from following symlinks (nathanwhit81161b9)