VYPR
Critical severityNVD Advisory· Published Mar 19, 2024· Updated Aug 2, 2024

Parse Server crash and RCE via invalid Cloud Function or Cloud Job name

CVE-2024-29027

Description

Parse Server is an open source backend that can be deployed to any infrastructure that can run Node.js. Prior to versions 6.5.5 and 7.0.0-alpha.29, calling an invalid Parse Server Cloud Function name or Cloud Job name crashes the server and may allow for code injection, internal store manipulation or remote code execution. The patch in versions 6.5.5 and 7.0.0-alpha.29 added string sanitation for Cloud Function name and Cloud Job name. As a workaround, sanitize the Cloud Function name and Cloud Job name before it reaches Parse Server.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
parse-servernpm
< 6.5.56.5.5
parse-servernpm
>= 7.0.0-alpha.1, < 7.0.0-alpha.297.0.0-alpha.29

Affected products

1

Patches

2
5ae6d6a36d75

fix: Server crashes on invalid Cloud Function or Cloud Job name; fixes security vulnerability [GHSA-6hh7-46r2-vf29](https://github.com/parse-community/parse-server/security/advisories/GHSA-6hh7-46r2-vf29) (#9023)

2 files changed · +40 1
  • spec/ParseHooks.spec.js+33 0 modified
    @@ -694,3 +694,36 @@ describe('triggers', () => {
         expect(req.context).toBeUndefined();
       });
     });
    +
    +describe('sanitizing names', () => {
    +  const invalidNames = [
    +    `test'%3bdeclare%20@q%20varchar(99)%3bset%20@q%3d'%5c%5cxxxxxxxxxxxxxxx.yyyyy'%2b'fy.com%5cxus'%3b%20exec%20master.dbo.xp_dirtree%20@q%3b--%20`,
    +    `test.function.name`,
    +  ];
    +
    +  it('should not crash server and return error on invalid Cloud Function name', async () => {
    +    for (const invalidName of invalidNames) {
    +      let error;
    +      try {
    +        await Parse.Cloud.run(invalidName);
    +      } catch (err) {
    +        error = err;
    +      }
    +      expect(error).toBeDefined();
    +      expect(error.message).toMatch(/Invalid function/);
    +    }
    +  });
    +
    +  it('should not crash server and return error on invalid Cloud Job name', async () => {
    +    for (const invalidName of invalidNames) {
    +      let error;
    +      try {
    +        await Parse.Cloud.startJob(invalidName);
    +      } catch (err) {
    +        error = err;
    +      }
    +      expect(error).toBeDefined();
    +      expect(error.message).toMatch(/Invalid job/);
    +    }
    +  });
    +});
    
  • src/triggers.js+7 1 modified
    @@ -86,6 +86,12 @@ const Category = {
     };
     
     function getStore(category, name, applicationId) {
    +  const invalidNameRegex = /['"`]/;
    +  if (invalidNameRegex.test(name)) {
    +    // Prevent a malicious user from injecting properties into the store
    +    return {};
    +  }
    +
       const path = name.split('.');
       path.splice(-1); // remove last component
       applicationId = applicationId || Parse.applicationId;
    @@ -94,7 +100,7 @@ function getStore(category, name, applicationId) {
       for (const component of path) {
         store = store[component];
         if (!store) {
    -      return undefined;
    +      return {};
         }
       }
       return store;
    
9f6e3429d3b3

fix: Server crashes on invalid Cloud Function or Cloud Job name; fixes security vulnerability [GHSA-6hh7-46r2-vf29](https://github.com/parse-community/parse-server/security/advisories/GHSA-6hh7-46r2-vf29) (#9024)

2 files changed · +40 1
  • spec/ParseHooks.spec.js+33 0 modified
    @@ -694,3 +694,36 @@ describe('triggers', () => {
         expect(req.context).toBeUndefined();
       });
     });
    +
    +describe('sanitizing names', () => {
    +  const invalidNames = [
    +    `test'%3bdeclare%20@q%20varchar(99)%3bset%20@q%3d'%5c%5cxxxxxxxxxxxxxxx.yyyyy'%2b'fy.com%5cxus'%3b%20exec%20master.dbo.xp_dirtree%20@q%3b--%20`,
    +    `test.function.name`,
    +  ];
    +
    +  it('should not crash server and return error on invalid Cloud Function name', async () => {
    +    for (const invalidName of invalidNames) {
    +      let error;
    +      try {
    +        await Parse.Cloud.run(invalidName);
    +      } catch (err) {
    +        error = err;
    +      }
    +      expect(error).toBeDefined();
    +      expect(error.message).toMatch(/Invalid function/);
    +    }
    +  });
    +
    +  it('should not crash server and return error on invalid Cloud Job name', async () => {
    +    for (const invalidName of invalidNames) {
    +      let error;
    +      try {
    +        await Parse.Cloud.startJob(invalidName);
    +      } catch (err) {
    +        error = err;
    +      }
    +      expect(error).toBeDefined();
    +      expect(error.message).toMatch(/Invalid job/);
    +    }
    +  });
    +});
    
  • src/triggers.js+7 1 modified
    @@ -86,6 +86,12 @@ const Category = {
     };
     
     function getStore(category, name, applicationId) {
    +  const invalidNameRegex = /['"`]/;
    +  if (invalidNameRegex.test(name)) {
    +    // Prevent a malicious user from injecting properties into the store
    +    return {};
    +  }
    +
       const path = name.split('.');
       path.splice(-1); // remove last component
       applicationId = applicationId || Parse.applicationId;
    @@ -94,7 +100,7 @@ function getStore(category, name, applicationId) {
       for (const component of path) {
         store = store[component];
         if (!store) {
    -      return undefined;
    +      return {};
         }
       }
       return store;
    

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

7

News mentions

0

No linked articles in our index yet.