Vulnerabilities/

Elysia has a string URL format ReDoS

Severity:
High

Description

t.String({ format: 'url' }) is vulnerable to redos

Repeating a partial url format (protocol and hostname) multiple times cause regex to slow down significantly

Here’s a table demonstrating how long it takes to process repeated partial url format | n repeat | elapsed_ms | | — | — | | 1024 | 33.993 | | 2048 | 134.357 | | 4096 | 537.

Recommendation

Update the elysia package to the latest compatible version. Followings are version details:

References

Related Issues

Tags:
npm
elysia
Anything's wrong? Let us know Last updated on March 10, 2026