
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
The HLID is a human-readable lexicographically sortable identifier that borrows similar concepts from -
HLIDs have the following properties -
With all good things there are tradeoffs -
For example a HLID value -
20241105-1108-5200-00ff-8fa646f09a7e
^ ^ ^ ^ ^ ^ ^
| | | | | | |- 12x hex: nonce-value -or- hmac-value
| | | | | |- 2x hex: one byte of user-data; 2x hex chars
| | | |+ |- 4x digits: -10^4 seconds; tenth of millisecond
| | |- 2x digits: seconds
| |- 4x digits: hours and minutes
|- 8x digits: year and month and day
All values are zero-padded when required.
pipx install hlid
>>> from hlid import HLID
>>> hlid = HLID()
>>> print(str(hlid))
20250213-1615-0320-9000-723da4092594
>>> print(f"{hlid.hex=}")
hlid.hex='20250213161503209000723da4092594'
>>> print(f"{hlid.age=}")
hlid.age=0.000799
>>> print(f"{hlid.time=}")
hlid.time=1739463303.209
>>> print(f"{hlid.datetime=}")
hlid.datetime=datetime.datetime(2025, 2, 13, 16, 15, 3, 209000, tzinfo=datetime.timezone.utc)
>>> from hlid import HLID
>>> hlid1 = HLID()
>>> hlid2 = HLID(hlid1.hex)
>>> assert hlid1.hex == hlid2.hex
>>> from hlid import hlid, HLID
>>> from uuid import uuid4
>>> secret = uuid4().hex
>>> hlid_signed = hlid(secret=secret)
>>> print(hlid_signed)
20250213-1613-0211-8000-c199fc3695c5
>>> hlid_test = HLID(hlid_signed.hex, secret=secret)
>>> print(hlid_test)
20250213-1613-0211-8000-c199fc3695c5
>>> bad_secret = uuid4().hex
>>> HLID(hlid_signed.hex, secret=bad_secret)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ndejong/.local/venvs/hlid/lib/python3.12/site-packages/hlid/__init__.py", line 65, in __init__
raise ValueError("HLID fails HMAC check.")
ValueError: HLID fails HMAC check.
FAQs
HLID: a Human Lexicographically (sortable) Identifier
We found that hlid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.