REST & JSON API Authentication for Drupal
The module fails to block access when the special key has not been set up. Anyone could bypass the security checks to view hidden information. They could also alter any data on the site including the code itself.
- Who could do thisAnyone visiting the site. No login needed.
- Does it apply to youSites are affected when data feed security is turned on but the special key has not been created.
- Has it been used in attacksNo sign of it.
- How urgentDrupal rates this critical. Cyber Essentials expects a fix within 14 days. Do it this week.
Tell your developerUpdate REST & JSON API Authentication for Drupal to 3.2.1.
For developers: what the fix changed
The fix adds a check in ApiAuthenticationApiToken::validateUserAndToken() to explicitly reject requests if the expected API token is not a string or is empty, preventing authentication bypass when no key is configured. It also adds validation in MiniOrangeAPIAuth::validateForm() to prevent saving an application without generating an API key.
Also in this release The release also includes minor code cleanups, such as removing unused imports and fixing trailing commas, alongside new automated tests.
config/schema/rest_api_authentication.schema.yml+6 −0src/ApiAuthenticationApiToken.php+6 −0 fixsrc/Controller/RestApiAuthenticationController.php+3 −3src/Form/MiniOrangeAPIAuth.php+30 −1 fixsrc/Form/UpgradePlansForm.php+2 −3src/MiniorangeApiAuthConstants.php+4 −2src/MiniorangeApiAuthSupport.php+1 −1src/Routing/RouteSubscriber.php+0 −3src/Services/RestApiLogger.php+0 −1src/Utilities.php+1 −1