<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://db.gcve.eu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-02T21:45:33.086499+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@gcve.eu</email>
  </author>
  <link href="https://db.gcve.eu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://db.gcve.eu/vuln/ghsa-w5hq-g745-h8pq</id>
    <title>GHSA-w5hq-g745-h8pq — uuid: Missing buffer bounds check in v3/v5/v6 when buf is provided</title>
    <updated>2026-10-02T21:45:33.089475+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> npm: uuid</p>
<p>### Summary</p>
<p>The `v3()`, `v5()`, and `v6()` [API methods](https://github.com/uuidjs/uuid#api-summary) (not `uuid` release versions) accept external output buffers but do not reject out-of-range writes (small `buf` or large `offset`).  
By contrast, `v4()`, `v1()`, and `v7()` API methods explicitly throw `RangeError` on invalid bounds.</p>
<p>This inconsistency allows **silent partial writes** into caller-provided buffers.</p>
<p>### Affected code</p>
<p>- `src/v35.ts` (`v3()`/`v5()` path) writes `buf[offset + i]` without bounds validation.
- `src/v6.ts` writes `buf[offset + i]` without bounds validation.</p>
<p>### Reproducible PoC</p>
<p>```bash
cd /home/StrawHat/uuid
npm ci
npm run build</p>
<p>node --input-type=module -e "
import {v4,v5,v6} from './dist-node/index.js';
const ns='6ba7b810-9dad-11d1-80b4-00c04fd430c8';
for (const [name,fn] of [
  ['v4()',()=&gt;v4({},new Uint8Array(8),4)],
  ['v5()',()=&gt;v5('x',ns,new Uint8Array(8),4)],
  ['v6()',()=&gt;v6({},new Uint8Array(8),4)],
]) {
  try { fn(); console.log(name,'NO_THROW'); }
  catch(e){ console.log(name,'THREW',e.name); }
}"
```</p>
<p>Observed:</p>
<p>- `v4() THREW RangeError`
- `v5() NO_THROW`
- `v6() NO_THROW`</p>
<p>Example partial overwrite evidence captured during audit:</p>
<p>```text
same true buf [
  170, 170, 170, 170,
   75, 224, 100,  63
]
v6 [
  187, 187, 187, 187,
   31,  19, 185,  64
]
```</p>
<p>### Security impact</p>
<p>- **Primary**: integrity/robustness issue (silent partial output).
- If an application assumes full UUID writes into preallocated buffers, this can produce ma…</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/ghsa-w5hq-g745-h8pq"/>
  </entry>
</feed>
