Exploit databaseDownload repository ZIP
GH-ce923d7001b670de489940377274bce1
ondrejdrapalik/node-tar-cve-demo
Sources for CVE-2026-23745
2 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files29
ondrejdrapalik/node-tar-cve-demoRevision 8bb83f7e5154
- ↑..Parent directory
- create.ts
- cwd-error.ts
- extract.ts
- get-write-flag.ts
- header.ts
- index.ts
- large-numbers.ts
- list.ts
- make-command.ts
- mkdir.ts
- mode-fix.ts
- normalize-unicode.ts
- normalize-windows-path.ts
- options.ts
- pack.ts
- parse.ts
- path-reservations.ts
- pax.ts
- read-entry.ts
- replace.ts
- strip-absolute-path.ts
- strip-trailing-slashes.ts
- symlink-error.ts
- types.ts
- unpack.ts
- update.ts
- warn-method.ts
- winchars.ts
- write-entry.ts
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/types.ts
TypeScript · 1,972 bytesexport const isCode = (c: string): c is EntryTypeCode =>
name.has(c as EntryTypeCode)
export const isName = (c: string): c is EntryTypeName =>
code.has(c as EntryTypeName)
export type EntryTypeCode =
| '0'
| ''
| '1'
| '2'
| '3'
| '4'
| '5'
| '6'
| '7'
| 'g'
| 'x'
| 'A'
| 'D'
| 'I'
| 'K'
| 'L'
| 'M'
| 'N'
| 'S'
| 'V'
| 'X'
export type EntryTypeName =
| 'File'
| 'OldFile'
| 'Link'
| 'SymbolicLink'
| 'CharacterDevice'
| 'BlockDevice'
| 'Directory'
| 'FIFO'
| 'ContiguousFile'
| 'GlobalExtendedHeader'
| 'ExtendedHeader'
| 'SolarisACL'
| 'GNUDumpDir'
| 'Inode'
| 'NextFileHasLongLinkpath'
| 'NextFileHasLongPath'
| 'ContinuationFile'
| 'OldGnuLongPath'
| 'SparseFile'
| 'TapeVolumeHeader'
| 'OldExtendedHeader'
| 'Unsupported'
// map types from key to human-friendly name
export const name = new Map<EntryTypeCode, EntryTypeName>([
['0', 'File'],
// same as File
['', 'OldFile'],
['1', 'Link'],
['2', 'SymbolicLink'],
// Devices and FIFOs aren't fully supported
// they are parsed, but skipped when unpacking
['3', 'CharacterDevice'],
['4', 'BlockDevice'],
['5', 'Directory'],
['6', 'FIFO'],
// same as File
['7', 'ContiguousFile'],
// pax headers
['g', 'GlobalExtendedHeader'],
['x', 'ExtendedHeader'],
// vendor-specific stuff
// skip
['A', 'SolarisACL'],
// like 5, but with data, which should be skipped
['D', 'GNUDumpDir'],
// metadata only, skip
['I', 'Inode'],
// data = link path of next file
['K', 'NextFileHasLongLinkpath'],
// data = path of next file
['L', 'NextFileHasLongPath'],
// skip
['M', 'ContinuationFile'],
// like L
['N', 'OldGnuLongPath'],
// skip
['S', 'SparseFile'],
// skip
['V', 'TapeVolumeHeader'],
// like x
['X', 'OldExtendedHeader'],
])
// map the other direction
export const code = new Map<EntryTypeName, EntryTypeCode>(
Array.from(name).map(kv => [kv[1], kv[0]]),
)