Problem/Motivation

Opus 4.8 analysis:

 RateLimitPerUserValidator::isPostCountBelowLimit() counts existing entities in the window with:
  ->condition('uid', $uid)
  ->condition('created', $rate_limit_interval_start, '>=')
  created is a plain base field (LogJson.php:123) and is not marked internal/read-only in JSON:API (only id/uuid are — confirmed in
  core's ResourceTypeRepository). So a client with create log_json can set created to an old timestamp on every POST. Every stored row
  then falls outside the interval window, the count is always 0, and the rate limit never triggers — defeating the module's sole
  anti-DoS protection. The same applies to the REST endpoint.

  Fix: force created server-side (set it in preSave() / mark it read-only for the entity, or rate-limit on a server-trusted timestamp),
  or count by entity id/insert time rather than the user-supplied created.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ptmkenny created an issue. See original summary.

  • ptmkenny committed 83930636 on 1.0.x
    fix: #3605223 Security: Rate limit can be bypassed by setting created to...
ptmkenny’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.