VYPR
Low severity3.7NVD Advisory· Published Apr 15, 2026· Updated Apr 20, 2026

CVE-2026-33877

CVE-2026-33877

Description

ApostropheCMS is an open-source Node.js content management system. Versions 4.28.0 and prior contain a timing side-channel vulnerability in the password reset endpoint (/api/v1/@apostrophecms/login/reset-request) that allows unauthenticated username and email enumeration. When a user is not found, the handler returns after a fixed 2-second artificial delay, but when a valid user is found, it performs a MongoDB update and SMTP email send with no equivalent delay normalization, producing measurably different response times. The endpoint also accepts both username and email via an $or query, and has no rate limiting as the existing checkLoginAttempts throttle only applies to the login flow. This enables automated enumeration of valid accounts for use in credential stuffing or targeted phishing. Only instances that have explicitly enabled the passwordReset option are affected, as it defaults to false. This issue has been fixed in version 4.29.0.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
apostrophenpm
< 4.29.04.29.0

Affected products

1

Patches

1
e266cffd8c0d

Merge commit from fork

https://github.com/apostrophecms/apostropheTom BoutellApr 15, 2026via ghsa
2 files changed · +44 40
  • .changeset/slick-ducks-shine.md+5 0 added
    @@ -0,0 +1,5 @@
    +---
    +"apostrophe": patch
    +---
    +
    +Security: ensure a minimum 2-second delay in the password reset flow to avoid disclosing whether the email or username was valid or not. Thanks to [restriction](https://github.com/restriction) for reporting the issue and proposing the fix.
    
  • packages/apostrophe/modules/@apostrophecms/login/index.js+39 40 modified
    @@ -293,68 +293,67 @@ module.exports = {
             },
             ...self.isPasswordResetEnabled() && {
               async resetRequest(req) {
    -            const wait = (t = 2000) => Promise.delay(t);
    +            const MIN_RESPONSE_TIME = 2000;
    +            const startTime = Date.now();
                 const site = (req.headers.host || '').replace(/:\d+$/, '');
                 const email = self.apos.launder.string(req.body.email);
                 if (!email.length) {
                   throw self.apos.error('invalid', req.t('apostrophe:loginResetEmailRequired'));
                 }
                 let user;
    -            // error not reported to browser for security reasons
                 try {
                   user = await self.getPasswordResetUser(req.body.email);
                 } catch (e) {
                   self.apos.util.error(e);
                 }
                 if (!user) {
    -              await wait();
                   self.apos.util.error(
                     `Reset password request error - the user ${email} doesn\`t exist.`
                   );
    -              return;
    -            }
    -            if (!user.email) {
    -              await wait();
    +            } else if (!user.email) {
                   self.apos.util.error(
                     `Reset password request error - the user ${user.username} doesn\`t have an email.`
                   );
    -              return;
    -            }
    -            const reset = self.apos.util.generateId();
    -            user.passwordReset = reset;
    -            user.passwordResetAt = new Date();
    -            await self.apos.user.update(req, user, { permissions: false });
    -            // Fix - missing host in the absoluteUrl results in a panic.
    -            let port = (req.headers.host || '').split(':')[1];
    -            if (!port || [ '80', '443' ].includes(port)) {
    -              port = '';
                 } else {
    -              port = `:${port}`;
    +              const reset = self.apos.util.generateId();
    +              user.passwordReset = reset;
    +              user.passwordResetAt = new Date();
    +              await self.apos.user.update(req, user, { permissions: false });
    +              let port = (req.headers.host || '').split(':')[1];
    +              if (!port || [ '80', '443' ].includes(port)) {
    +                port = '';
    +              } else {
    +                port = `:${port}`;
    +              }
    +              const parsed = new URL(
    +                req.absoluteUrl,
    +                self.apos.baseUrl
    +                  ? undefined
    +                  : `${req.protocol}://${req.hostname}${port}`
    +              );
    +              parsed.pathname = self.login();
    +              parsed.search = '?';
    +              parsed.searchParams.append('reset', reset);
    +              parsed.searchParams.append('email', user.email);
    +              try {
    +                await self.email(req, 'passwordResetEmail', {
    +                  user,
    +                  url: parsed.toString(),
    +                  site
    +                }, {
    +                  to: user.email,
    +                  subject: req.t('apostrophe:passwordResetRequest', { site })
    +                });
    +              } catch (err) {
    +                self.apos.util.error(`Error while sending email to ${user.email}`, err);
    +              }
                 }
    -            const parsed = new URL(
    -              req.absoluteUrl,
    -              self.apos.baseUrl
    -                ? undefined
    -                : `${req.protocol}://${req.hostname}${port}`
    -            );
    -            parsed.pathname = self.login();
    -            parsed.search = '?';
    -            parsed.searchParams.append('reset', reset);
    -            parsed.searchParams.append('email', user.email);
    -            try {
    -              await self.email(req, 'passwordResetEmail', {
    -                user,
    -                url: parsed.toString(),
    -                site
    -              }, {
    -                to: user.email,
    -                subject: req.t('apostrophe:passwordResetRequest', { site })
    -              });
    -            } catch (err) {
    -              self.apos.util.error(`Error while sending email to ${user.email}`, err);
    +            // Pad all paths to a constant minimum duration
    +            const elapsed = Date.now() - startTime;
    +            if (elapsed < MIN_RESPONSE_TIME) {
    +              await Promise.delay(MIN_RESPONSE_TIME - elapsed);
                 }
               },
    -
               async reset(req) {
                 const password = self.apos.launder.string(req.body.password);
                 if (!password.length) {
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.