Skip to content

harden: the request caching mechanism in both topicfind... in... - #105

Open
anupamme wants to merge 1 commit into
bangumi:masterfrom
anupamme:fix-repo-scripts-v-001-unbounded-ongoing-requests-map
Open

harden: the request caching mechanism in both topicfind... in...#105
anupamme wants to merge 1 commit into
bangumi:masterfrom
anupamme:fix-repo-scripts-v-001-unbounded-ongoing-requests-map

Conversation

@anupamme

@anupamme anupamme commented Aug 2, 2026

Copy link
Copy Markdown

Summary

Harden input handling in inchei/topicFindComment.user.js (flagged by multi_agent_ai).

Vulnerability

Field Value
ID V-001
Severity HIGH
Scanner multi_agent_ai
Rule V-001
File inchei/topicFindComment.user.js:161
Assessment Defensive hardening

Description: The request caching mechanism in both topicFindComment.user.js and timelineEpComment.user.js uses Map objects (ongoingRequests, pendingRequests) to track pending API requests. While there is a maxConcurrency limit (default 3) in timelineEpComment.user.js, there is no maximum size limit for the cache itself. If many unique requests are made, the cache can grow unbounded, potentially causing memory exhaustion.

Changes

  • inchei/topicFindComment.user.js

Behavior Preservation

The change is scoped to 1 file on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.


This patch removes an exploit primitive — a code pattern that, while not independently exploitable today, could be chained with other weaknesses by automated exploit-development tooling. Proactive removal of such primitives raises the bar against increasingly capable automated attack tools.


Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security
@anupamme
anupamme requested a review from inchei as a code owner August 2, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant