Vulnerabilities

2 via 2 paths

Dependencies

116

Source

GitHub

Find, fix and prevent vulnerabilities in your code.

Severity
  • 2
Status
  • 2
  • 0
  • 0

medium severity
new

Improper Enforcement of Behavioral Workflow

  • Vulnerable module: express-rate-limit
  • Introduced through: express-rate-limit@6.11.2

Detailed paths

  • Introduced through: photoprism-helper@aerilym/photoprism-helper › express-rate-limit@6.11.2
    Remediation: Upgrade to express-rate-limit@8.7.2.

Overview

express-rate-limit is a Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.

Affected versions of this package are vulnerable to Improper Enforcement of Behavioral Workflow via MemoryStore.resetClient mutating the shared resetTime Date object in place when skipFailedRequests or skipSuccessfulRequests is enabled. MemoryStore.increment returns the stored Client object directly, so the middleware's resetTime reference and the store's client.resetTime point to the same Date. When a subsequent request triggers resetClient, it calls client.resetTime.setTime(now + windowMs), advancing that shared Date forward. An earlier request still in flight then finishes or disconnects after the window boundary, reads the now-updated reset time, passes the stale-window guard at rate-limit.ts:545-547, and decrements the new window's hit count. A client that keeps requests in flight across a window boundary can thereby obtain up to one additional configured limit worth of requests in the new window as a one-off burst.

Note: This is only exploitable when the default MemoryStore is used together with the skipFailedRequests or skipSuccessfulRequests option.

Remediation

Upgrade express-rate-limit to version 8.7.2 or higher.

References

medium severity

Improper Validation of Specified Index, Position, or Offset in Input

  • Vulnerable module: uuid
  • Introduced through: node-cron@3.0.3

Detailed paths

  • Introduced through: photoprism-helper@aerilym/photoprism-helper › node-cron@3.0.3 › uuid@8.3.2
    Remediation: Upgrade to node-cron@4.0.0.

Overview

uuid is a RFC4122 (v1, v4, and v5) compliant UUID library.

Affected versions of this package are vulnerable to Improper Validation of Specified Index, Position, or Offset in Input due to accepting external output buffers but not rejecting out-of-range writes (small buf or large offset). This inconsistency allows silent partial writes into caller-provided buffers.

PoC

cd /home/StrawHat/uuid
npm ci
npm run build

node --input-type=module -e "
import {v4,v5,v6} from './dist-node/index.js';
const ns='6ba7b810-9dad-11d1-80b4-00c04fd430c8';
for (const [name,fn] of [
  ['v4',()=>v4({},new Uint8Array(8),4)],
  ['v5',()=>v5('x',ns,new Uint8Array(8),4)],
  ['v6',()=>v6({},new Uint8Array(8),4)],
]) {
  try { fn(); console.log(name,'NO_THROW'); }
  catch(e){ console.log(name,'THREW',e.name); }
}"

Remediation

Upgrade uuid to version 11.1.1, 14.0.0 or higher.

References