Skip to content
Business logic Disclosed report Intermediate CVE-2023-45148

Memcached used as RateLimiter backend is no-op

With Memcached as rate limiter backend, actions that partly reset a cache entry wipe rate limit attempts, weakening brute-force protection.

nickvergessen Follow

Originally disclosed on HackerOne

Medium 4.3 View original
  • Triaged in under an hour
  • Fixed in 42 days
  • Disclosed after 3 months

Summary by the program

Security advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-xmhp-7vr4-hp63

The report

Summary:

When Memcached is used as backend: https://github.com/nextcloud/server/blob/c705b8fcb3de7910e67cd2ed2d2b38653f58962a/lib/private/Server.php#L787-L799

The following code block is problematic: https://github.com/nextcloud/server/blob/90104bc1c448c6da2fd3e052fca75bb3fb261c87/lib/private/Memcache/Memcached.php#L135-L139

I guess we need to check the actual cache type and use the DB backend when Memcached is used?

Impact

Any action that partly resets any cache entry will wipe rate limit attempts and future bruteforce protection (with https://github.com/nextcloud/server/pull/39870 )

The original report as published on HackerOne, by nickvergessen. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the Memcached cache implementation does not properly support the increment operation used by the rate limiter, so attempts are not counted.

Impact

Brute-force protection could be weakened because rate limit attempts are wiped.

What the attacker needed

Memcached configured as cache backend

The fix

The rate limiter should check the actual cache type and use a database backend when Memcached is in use.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Here, the counting was broken when Memcached was used: actions that partly reset a cache entry wiped the attempts, so protection was weakened.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by nickvergessen

View all

10 more disclosed reports, best first.

More from Nextcloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.