CVE-2021-32691 (published 2021-06-16T22:15Z)

Apollos Apps is an open source platform for launching church-related apps. In Apollos Apps versions prior to 2.20.0, new user registrations are able to access anyone's account by only knowing their basic profile information (name, birthday, gender, etc). This includes all app functionality within the app, as well as any authenticated links to Rock-based webpages (such as giving and events). There is a patch in version 2.20.0. As a workaround, one can patch one's server by overriding the `create` data source method on the `People` class.

Severity: HIGH
CVSS v2 base score: 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P)
CVSS v3 base score: 9.8, CRITICAL (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

Weakness information:
cwe_id: CWE-287
cwe_name: Improper Authentication
description: When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
extended_description: 
            
			
         
         

Fix information:
repo_url: https://github.com/ApollosProject/apollos-apps
commit_details: repo_url: https://github.com/ApollosProject/apollos-apps
author: Michael Neeley
author_date: 2021-06-14 07:55:07-04:00
msg: fix: turns off automerging new people (#1989)

* fix: turns off automerging new people

* fix

* tests and snaps
repository: repo_url: https://github.com/ApollosProject/apollos-apps
repo_name: ApollosProject/apollos-apps
repo_language: JavaScript
owner: ApollosProject
file_changes: filename: index.tests.js
change_type: ModificationType.MODIFY
diff: @@ -224,11 +224,12 @@ describe('Auth', () => {
     });
 
     it('creates user profile', async () => {
+      context.dataSources.Person.create = jest.fn(() => 35);
       const result = await context.dataSources.Auth.createUserProfile({
         email: 'isaac.hardy@newspring.cc',
       });
 
-      expect(result).toEqual('35');
+      expect(result).toEqual(35);
     });
 
     it('throws error in createUserProfile', async () => {
@@ -276,6 +277,7 @@ describe('Auth', () => {
           }
         }
       `;
+      context.dataSources.Person.create = jest.fn(() => 1);
 
       const rootValue = {};
 

programming_language: TypeScript
filename: data-source.tests.js.snap
change_type: ModificationType.MODIFY
diff: @@ -7,19 +7,13 @@ Array [
   Array [
     "/People",
     Object {
-      "BirthDay": 1,
-      "BirthMonth": 2,
-      "BirthYear": 2020,
-      "FirstName": "Vincent",
-      "Gender": 1,
+      "Gender": 0,
       "IsSystem": false,
     },
   ],
 ]
 `;
 
-exports[`Person creates a profile 2`] = `Object {}`;
-
 exports[`Person gets person from aliasId: The call to fetch the alias id 1`] = `
 Array [
   Array [

programming_language: TypeScript
filename: data-source.js
change_type: ModificationType.MODIFY
diff: @@ -65,13 +65,18 @@ export default class Person extends RockApolloDataSource {
     return null;
   };
 
-  create = (profile) => {
+  create = async (profile) => {
     const rockUpdateFields = this.mapApollosFieldsToRock(profile);
-    return this.post('/People', {
+    // auto-merge functionality is compromised
+    // we are creating a new user and patching them with profile details
+    const id = await this.post('/People', {
       Gender: 0, // required by Rock. Listed first so it can be overridden.
-      ...rockUpdateFields,
       IsSystem: false, // required by rock
     });
+    await this.patch(`/People/${id}`, {
+      ...rockUpdateFields,
+    });
+    return id;
   };
 
   mapGender = ({ gender }) => {

programming_language: TypeScript