All @feathersjs/authentication-oauth versions

@feathersjs/authentication-oauth @4.5.19

rejected
This version was rejected. It did not pass GreenFlagged's security review and is not served by the registry. The findings and risk dispositions below explain why.
85
Risk Score
License
No
Install Scripts
9
Dependencies
11
Dev Dependencies
15.1 KB
Package Size
Published

Maintainers

dafflmarshallswainalexisabril

Keywords

feathersfeathers-plugin

Dependencies (9)

PackageConstraintRegistry Status
debug ^4.4.3 auto_approved
grant ^4.7.0 pending
lodash ^4.17.23 auto_approved
grant-profile ^0.0.11 Not imported
express-session ^1.19.0 auto_approved
@feathersjs/errors ^4.5.19 auto_approved
@feathersjs/express ^4.5.19 auto_approved
@feathersjs/feathers ^4.5.19 pending
@feathersjs/authentication ^4.5.19 auto_approved

Dev Dependencies (11)

PackageConstraintRegistry Status
shx ^0.4.0 auto_approved
axios ^0.30.2 auto_approved
mocha ^9.2.2 auto_approved
ts-node ^10.9.2 pending
typescript ^4.9.5 auto_approved
@types/node ^17.0.45 auto_approved
@types/debug ^4.1.12 auto_approved
@types/mocha ^9.1.1 auto_approved
@types/lodash ^4.17.23 auto_approved
@types/express ^4.17.25 auto_approved
@types/express-session ^1.18.2 auto_approved

Transitive Dependency Tree

102 transitive deps max depth 10
  ├─ @feathersjs/authentication ^4.5.19 → 4.5.19
  ├─ @feathersjs/errors ^4.5.19 → 4.5.19
  ├─ @feathersjs/express ^4.5.19 → 4.5.19
  ├─ @feathersjs/feathers ^4.5.19
  ├─ debug ^4.4.3 → 4.4.3
  ├─ express-session ^1.19.0 → 1.19.0
  ├─ grant ^4.7.0
├─ lodash ^4.17.23 → 4.18.1
  ├─ @feathersjs/commons ^4.5.19 → 4.5.19
  ├─ @feathersjs/errors ^4.5.19 → 4.5.19
  ├─ @feathersjs/feathers ^4.5.19
  ├─ @feathersjs/transport-commons ^4.5.19 → 4.5.19
  ├─ @types/express ^4.17.25
  ├─ @types/jsonwebtoken ^9.0.10 → 9.0.10
  ├─ cookie ~0.7.2 → 0.7.2
  ├─ cookie-signature ~1.0.7 → 1.0.7
  ├─ debug ^4.4.3 → 4.4.3
  ├─ debug ~2.6.9
  ├─ depd ~2.0.0 → 2.0.0
  ├─ express ^4.22.1 → 4.22.1
  ├─ jsonwebtoken ^9.0.3 → 9.0.3
  ├─ lodash ^4.17.23 → 4.18.1
  ├─ long-timeout ^0.1.1 → 0.1.1
  ├─ ms ^2.1.3 → 2.1.3
  ├─ on-headers ~1.1.0 → 1.1.0
  ├─ parseurl ~1.3.3 → 1.3.3
  ├─ safe-buffer ~5.2.1 → 5.2.1
  ├─ uberproto ^2.0.6 → 2.0.6
  ├─ uid-safe ~2.1.5 → 2.1.5
├─ uuid ^8.3.2 → 8.3.2
  ├─ @feathersjs/commons ^4.5.19 → 4.5.19
  ├─ @feathersjs/errors ^4.5.19 → 4.5.19
  ├─ @types/ms *
  ├─ @types/node * → 25.6.0
  ├─ accepts ~1.3.8 → 1.3.8
  ├─ array-flatten 1.1.1 → 1.1.1
  ├─ body-parser ~1.20.3 → 1.20.4
  ├─ content-disposition ~0.5.4 → 0.5.4
  ├─ content-type ~1.0.4 → 1.0.5
  ├─ cookie ~0.7.1 → 0.7.2
  ├─ cookie-signature ~1.0.6 → 1.0.7
  ├─ debug 2.6.9
  ├─ debug ^4.4.3 → 4.4.3
  ├─ depd 2.0.0 → 2.0.0
  ├─ encodeurl ~2.0.0 → 2.0.0
  ├─ escape-html ~1.0.3 → 1.0.3
  ├─ etag ~1.8.1 → 1.8.1
  ├─ finalhandler ~1.3.1 → 1.3.2
  ├─ fresh ~0.5.2 → 0.5.2
  ├─ http-errors ~2.0.0 → 2.0.1
  ├─ jws ^4.0.1 → 4.0.1
  ├─ lodash ^4.17.23 → 4.18.1
  ├─ lodash.includes ^4.3.0 → 4.3.0
  ├─ lodash.isboolean ^3.0.3 → 3.0.3
  ├─ lodash.isinteger ^4.0.4 → 4.0.4
  ├─ lodash.isnumber ^3.0.3 → 3.0.3
  ├─ lodash.isplainobject ^4.0.6 → 4.0.6
  ├─ lodash.isstring ^4.0.1 → 4.0.1
  ├─ lodash.once ^4.0.0 → 4.1.1
  ├─ merge-descriptors 1.0.3 → 1.0.3
  ├─ methods ~1.1.2 → 1.1.2
  ├─ ms ^2.1.3 → 2.1.3
  ├─ ms ^2.1.1 → 2.1.3
  ├─ on-finished ~2.4.1 → 2.4.1
  ├─ parseurl ~1.3.3 → 1.3.3
  ├─ path-to-regexp ~0.1.12
  ├─ proxy-addr ~2.0.7 → 2.0.7
  ├─ qs ~6.14.0 → 6.14.2
  ├─ random-bytes ~1.0.0
  ├─ range-parser ~1.2.1 → 1.2.1
  ├─ safe-buffer 5.2.1 → 5.2.1
  ├─ semver ^7.5.4 → 7.8.0
  ├─ send ~0.19.0 → 0.19.2
  ├─ serve-static ~1.16.2 → 1.16.3
  ├─ setprototypeof 1.2.0 → 1.2.0
  ├─ statuses ~2.0.1 → 2.0.2
  ├─ type-is ~1.6.18 → 1.6.18
  ├─ utils-merge 1.0.1
├─ vary ~1.1.2 → 1.1.2
  ├─ bytes ~3.1.2 → 3.1.2
  ├─ content-type ~1.0.5 → 1.0.5
  ├─ debug 2.6.9
  ├─ debug ^4.4.3 → 4.4.3
  ├─ depd ~2.0.0 → 2.0.0
  ├─ depd 2.0.0 → 2.0.0
  ├─ destroy ~1.2.0 → 1.2.0
  ├─ destroy 1.2.0 → 1.2.0
  ├─ ee-first 1.1.1 → 1.1.1
  ├─ encodeurl ~2.0.0 → 2.0.0
  ├─ escape-html ~1.0.3 → 1.0.3
  ├─ etag ~1.8.1 → 1.8.1
  ├─ forwarded 0.2.0 → 0.2.0
  ├─ fresh ~0.5.2 → 0.5.2
  ├─ http-errors ~2.0.1 → 2.0.1
  ├─ iconv-lite ~0.4.24 → 0.4.24
  ├─ inherits ~2.0.4 → 2.0.4
  ├─ ipaddr.js 1.9.1 → 1.9.1
  ├─ jwa ^2.0.1 → 2.0.1
  ├─ media-typer 0.3.0 → 0.3.0
  ├─ mime 1.6.0 → 1.6.0
  ├─ mime-types ~2.1.34 → 2.1.35
  ├─ mime-types ~2.1.24 → 2.1.35
  ├─ ms ^2.1.3 → 2.1.3
  ├─ ms 2.1.3 → 2.1.3
  ├─ negotiator 0.6.3 → 0.6.3
  ├─ on-finished ~2.4.1 → 2.4.1
  ├─ parseurl ~1.3.3 → 1.3.3
  ├─ qs ~6.14.0 → 6.14.2
  ├─ range-parser ~1.2.1 → 1.2.1
  ├─ raw-body ~2.5.3 → 2.5.3
  ├─ safe-buffer ^5.0.1 → 5.2.1
  ├─ safe-buffer 5.2.1 → 5.2.1
  ├─ send ~0.19.1 → 0.19.2
  ├─ setprototypeof ~1.2.0 → 1.2.0
  ├─ side-channel ^1.1.0 → 1.1.0
  ├─ statuses ~2.0.2 → 2.0.2
  ├─ toidentifier ~1.0.1 → 1.0.1
  ├─ type-is ~1.6.18 → 1.6.18
  ├─ undici-types ~7.19.0 → 7.19.2
├─ unpipe ~1.0.0 → 1.0.0
  ├─ buffer-equal-constant-time ^1.0.1 → 1.0.1
  ├─ bytes ~3.1.2 → 3.1.2
  ├─ debug 2.6.9
  ├─ depd 2.0.0 → 2.0.0
  ├─ depd ~2.0.0 → 2.0.0
  ├─ destroy 1.2.0 → 1.2.0
  ├─ ecdsa-sig-formatter 1.0.11 → 1.0.11
  ├─ ee-first 1.1.1 → 1.1.1
  ├─ encodeurl ~2.0.0 → 2.0.0
  ├─ es-errors ^1.3.0 → 1.3.0
  ├─ escape-html ~1.0.3 → 1.0.3
  ├─ etag ~1.8.1 → 1.8.1
  ├─ fresh ~0.5.2 → 0.5.2
  ├─ http-errors ~2.0.1 → 2.0.1
  ├─ iconv-lite ~0.4.24 → 0.4.24
  ├─ inherits ~2.0.4 → 2.0.4
  ├─ media-typer 0.3.0 → 0.3.0
  ├─ mime 1.6.0 → 1.6.0
  ├─ mime-db 1.52.0
  ├─ mime-types ~2.1.24 → 2.1.35
  ├─ ms 2.1.3 → 2.1.3
  ├─ ms ^2.1.3 → 2.1.3
  ├─ object-inspect ^1.13.3 → 1.13.4
  ├─ on-finished ~2.4.1 → 2.4.1
  ├─ range-parser ~1.2.1 → 1.2.1
  ├─ safe-buffer ^5.0.1 → 5.2.1
  ├─ safer-buffer >= 2.1.2 < 3 → 2.1.2
  ├─ setprototypeof ~1.2.0 → 1.2.0
  ├─ side-channel ^1.1.0 → 1.1.0
  ├─ side-channel-list ^1.0.0 → 1.0.1
  ├─ side-channel-map ^1.0.1 → 1.0.1
  ├─ side-channel-weakmap ^1.0.2 → 1.0.2
  ├─ statuses ~2.0.2 → 2.0.2
  ├─ toidentifier ~1.0.1 → 1.0.1
├─ unpipe ~1.0.0 → 1.0.0
  ├─ call-bound ^1.0.2 → 1.0.4
  ├─ depd ~2.0.0 → 2.0.0
  ├─ ee-first 1.1.1 → 1.1.1
  ├─ es-errors ^1.3.0 → 1.3.0
  ├─ get-intrinsic ^1.2.5 → 1.3.1
  ├─ inherits ~2.0.4 → 2.0.4
  ├─ mime-db 1.52.0
  ├─ object-inspect ^1.13.3 → 1.13.4
  ├─ object-inspect ^1.13.4 → 1.13.4
  ├─ safe-buffer ^5.0.1 → 5.2.1
  ├─ safer-buffer >= 2.1.2 < 3 → 2.1.2
  ├─ setprototypeof ~1.2.0 → 1.2.0
  ├─ side-channel-list ^1.0.0 → 1.0.1
  ├─ side-channel-map ^1.0.1 → 1.0.1
  ├─ side-channel-weakmap ^1.0.2 → 1.0.2
  ├─ statuses ~2.0.2 → 2.0.2
├─ toidentifier ~1.0.1 → 1.0.1
  ├─ async-function ^1.0.0
  ├─ async-generator-function ^1.0.0 → 1.0.0
  ├─ call-bind-apply-helpers ^1.0.2 → 1.0.2
  ├─ call-bound ^1.0.2 → 1.0.4
  ├─ es-define-property ^1.0.1 → 1.0.1
  ├─ es-errors ^1.3.0 → 1.3.0
  ├─ es-object-atoms ^1.1.1 → 1.1.1
  ├─ function-bind ^1.1.2 → 1.1.2
  ├─ generator-function ^2.0.0 → 2.0.1
  ├─ get-intrinsic ^1.3.0 → 1.3.1
  ├─ get-intrinsic ^1.2.5 → 1.3.1
  ├─ get-proto ^1.0.1
  ├─ gopd ^1.2.0
  ├─ has-symbols ^1.1.0 → 1.1.0
  ├─ hasown ^2.0.2 → 2.0.3
  ├─ math-intrinsics ^1.1.0 → 1.1.0
  ├─ object-inspect ^1.13.3 → 1.13.4
  ├─ object-inspect ^1.13.4 → 1.13.4
├─ side-channel-map ^1.0.1 → 1.0.1
  ├─ async-function ^1.0.0
  ├─ async-generator-function ^1.0.0 → 1.0.0
  ├─ call-bind-apply-helpers ^1.0.2 → 1.0.2
  ├─ call-bound ^1.0.2 → 1.0.4
  ├─ es-define-property ^1.0.1 → 1.0.1
  ├─ es-errors ^1.3.0 → 1.3.0
  ├─ es-object-atoms ^1.1.1 → 1.1.1
  ├─ function-bind ^1.1.2 → 1.1.2
  ├─ generator-function ^2.0.0 → 2.0.1
  ├─ get-intrinsic ^1.3.0 → 1.3.1
  ├─ get-intrinsic ^1.2.5 → 1.3.1
  ├─ get-proto ^1.0.1
  ├─ gopd ^1.2.0
  ├─ has-symbols ^1.1.0 → 1.1.0
  ├─ hasown ^2.0.2 → 2.0.3
  ├─ math-intrinsics ^1.1.0 → 1.1.0
├─ object-inspect ^1.13.3 → 1.13.4
  ├─ async-function ^1.0.0
  ├─ async-generator-function ^1.0.0 → 1.0.0
  ├─ call-bind-apply-helpers ^1.0.2 → 1.0.2
  ├─ es-define-property ^1.0.1 → 1.0.1
  ├─ es-errors ^1.3.0 → 1.3.0
  ├─ es-object-atoms ^1.1.1 → 1.1.1
  ├─ function-bind ^1.1.2 → 1.1.2
  ├─ generator-function ^2.0.0 → 2.0.1
  ├─ get-intrinsic ^1.3.0 → 1.3.1
  ├─ get-proto ^1.0.1
  ├─ gopd ^1.2.0
  ├─ has-symbols ^1.1.0 → 1.1.0
  ├─ hasown ^2.0.2 → 2.0.3
├─ math-intrinsics ^1.1.0 → 1.1.0
  ├─ async-function ^1.0.0
  ├─ async-generator-function ^1.0.0 → 1.0.0
  ├─ call-bind-apply-helpers ^1.0.2 → 1.0.2
  ├─ es-define-property ^1.0.1 → 1.0.1
  ├─ es-errors ^1.3.0 → 1.3.0
  ├─ es-object-atoms ^1.1.1 → 1.1.1
  ├─ function-bind ^1.1.2 → 1.1.2
  ├─ generator-function ^2.0.0 → 2.0.1
  ├─ get-proto ^1.0.1
  ├─ gopd ^1.2.0
  ├─ has-symbols ^1.1.0 → 1.1.0
  ├─ hasown ^2.0.2 → 2.0.3
  ├─ math-intrinsics ^1.1.0 → 1.1.0

Risk Dispositions (3 applicable to this version, 0 other)

Accepted rules are downgraded to INFO on future analyses; rejected rules escalate to CRITICAL.

Rule Source Disposition Author Reason
osv:GHSA-ppf9-4ffw-hh4p osv reject AI AI (osv): Open redirect enabling account takeover; affects all versions < 5.0.40. Verdict generalizes to every version in the affected range.
osv:GHSA-mp4x-c34x-wv3x osv reject AI AI (osv): Origin validation bypass enabling token exfiltration; affects all versions < 5.0.40. Verdict generalizes to every version in the affected range.
osv:GHSA-9m9c-vpv5-9g85 osv reject AI AI (osv): Sensitive headers exposed via unencrypted session cookie; affects all versions < 5.0.40. Verdict generalizes to every version in the affected range.

SAST Findings (4)

HIGH GHSA-9m9c-vpv5-9g85: Feathers exposes internal headers via unencrypted session cookie osv

All HTTP request headers are stored in the session cookie, which is signed but not encrypted, exposing internal proxy/gateway headers to clients. The OAuth service stores the complete headers object in the session: ```javascript // https://github.com/feathersjs/feathers/blob/dove/packages/authentication-oauth/src/service.ts#L173 session.headers = headers; ``` The session is persisted using `cookie-session`, which base64-encodes the data. While the cookie is signed to prevent tampering, the contents are readable by anyone by simply decoding the base64 value. Under specific deployment configurations (e.g., behind reverse proxies or API gateways), this can lead to exposure of sensitive internal infrastructure details such as API keys, service tokens, and internal IP addresses. **Credits**: Abdelwahed Madani Yousfi (@vvxhid) / Edoardo Geraci (@b0-n0-b0) / Thomas Rinsma (@ThomasRinsma) From Codean Labs.

HIGH GHSA-mp4x-c34x-wv3x: Feathers has an origin validation bypass via prefix matching osv

The origin validation uses `startsWith()` for comparison, allowing attackers to bypass the check by registering a domain that shares a common prefix with an allowed origin. The `getAllowedOrigin()` function checks if the Referer header starts with any allowed origin: ```javascript // https://github.com/feathersjs/feathers/blob/dove/packages/authentication-oauth/src/strategy.ts#L75 const allowedOrigin = origins.find((current) => referer.toLowerCase().startsWith(current.toLowerCase())); ``` This comparison is insufficient as it only validates the prefix. This is exploitable when the `origins` array is configured and an attacker registers a domain starting with an allowed origin string (e.g., `https://target.com.attacker.com` bypasses `https://target.com`). On its own, tokens are still redirected to a configured origin. However, in specific scenarios an attacker can initiate the OAuth flow from an unauthorized origin and exfiltrate tokens, achieving full account takeover. **Credits**: Abdelwahed Madani Yousfi (@vvxhid) / Edoardo Geraci (@b0-n0-b0) / Thomas Rinsma (@ThomasRinsma) From Codean Labs.

HIGH GHSA-ppf9-4ffw-hh4p: Feathers has an open redirect in OAuth callback enables account takeover osv

### Description The `redirect` query parameter is appended to the base origin without validation, allowing attackers to steal access tokens via URL authority injection. This leads to full account takeover, as the attacker obtains the victim's access token and can impersonate them. The application constructs the final redirect URL by concatenating the base origin with the user-supplied `redirect` parameter: ```javascript // https://github.com/feathersjs/feathers/blob/dove/packages/authentication-oauth/src/service.ts#L158C3-L176C4 const { redirect } = query; ... session.redirect = redirect; // https://github.com/feathersjs/feathers/blob/dove/packages/authentication-oauth/src/strategy.ts#L98 const redirectUrl = `${redirect}${queryRedirect}`; ``` Where: - `redirect` = base origin from config (e.g., `https://target.com`) - `queryRedirect` = user input from `?redirect=` parameter This is exploitable when the `origins` array is configured and origin values do not end with `/`. An attacker can supply `@attacker.com` as the redirect value results in `https://[email protected]#access_token=...`, where the browser interprets `attacker.com` as the host, leading to full account takeover. **Credits**: Abdelwahed Madani Yousfi (@vvxhid) / Edoardo Geraci (@b0-n0-b0) / Thomas Rinsma (@ThomasRinsma) From Codean Labs.

INFO No provenance attestation provenance

[Accepted risk] Package was published without Sigstore provenance. Only ~12% of npm packages have provenance, so this is common but not ideal.

Review Summary

Risk score: 85. Findings: 3 high (+75), 1 medium (+10), 1 info (+0).

Commit: f3bf30f6c7f7 Browse source

Published to npm: