Skip to content

Conversation

@depfu
Copy link
Contributor

@depfu depfu bot commented Apr 9, 2025


🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ koa (2.13.4 → 2.16.1) · Repo · Changelog

Security Advisories 🚨

🚨 Koajs vulnerable to Cross-Site Scripting (XSS) at ctx.redirect() function

Summary

In koa < 2.16.1 and < 3.0.0-alpha.5, passing untrusted user input to ctx.redirect() even after sanitizing it, may execute javascript code on the user who use the app.

Patches

This issue is patched in 2.16.1 and 3.0.0-alpha.5.

PoC

https://gist.github.com/linhnph05/03d677b183636af206ff781bdd19701a

Impact

  1. Redirect user to another phishing site
  2. Make request to another endpoint of the application based on user's cookie
  3. Steal user's cookie

🚨 Inefficient Regular Expression Complexity in koa

Summary

Koa uses an evil regex to parse the X-Forwarded-Proto and X-Forwarded-Host HTTP headers. This can be exploited to carry out a Denial-of-Service attack.

PoC

Coming soon.

Impact

This is a Regex Denial-of-Service attack and causes memory exhaustion. The regex should be improved and empty values should not be allowed.

Release Notes

2.16.1

fix: don't render redirect values in anchor ref

2.16.0

This is a backported release to fix core underlying issue with HEAD requests when using http2.createSecureServer. See discussion at #1593 and #1547.

  • fix missing cleanup, if response socket is no longer writeable (issue 1547) (#1593) 399cb6b

2.15.4

Full Changelog: 2.15.3...2.15.4

Fix: avoid redos on host and protocol getter, see GHSA-593f-38f6-jp5m

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 19 commits:

↗️ cookies (indirect, 0.8.0 → 0.9.1) · Repo · Changelog

Release Notes

0.9.1

  • Fix incorrectly disallowing equals sign in cookie value

0.9.0

  • Add partitioned option for CHIPS support
  • Add priority option for Priority cookie support
  • Fix accidental cookie name/value truncation when given invalid chars
  • Fix maxAge option to reject invalid values
  • Remove quotes from returned quoted cookie value
  • Use req.socket over deprecated req.connection
  • pref: small lookup regexp optimization

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu
Copy link
Contributor Author

depfu bot commented Jul 30, 2025

Closed in favor of #356.

@depfu depfu bot closed this Jul 30, 2025
@depfu depfu bot deleted the depfu/update/npm/koa-2.16.1 branch July 30, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant