Attacker can claim credentials for private program that has a published external program
A GraphQL mutation that lets a user claim a credential did not check whether the user had access to the private program behind a published external program. An attacker without access to that private program could therefore claim its credentials, draining the credential pool and potentially exposing sensitive information.
- Disclosed after 4 days
An attacker can obtain credentials for private programs that have a published external program, even when the attacker doesn't have access to the private program. Here is the regression spec to proof the security vulnerability:
diff --git a/spec/integration/graphql/mutations/claim_credential_mutation_spec.rb b/spec/integration/graphql/mutations/claim_credential_mutation_spec.rb
index 45745b0ce5..a81439bfe9 100644
--- a/spec/integration/graphql/mutations/claim_credential_mutation_spec.rb
+++ b/spec/integration/graphql/mutations/claim_credential_mutation_spec.rb
@@ -46,6 +46,20 @@ describe Mutations::ClaimCredentialMutation do
context 'with authenticated user' do
let(:current_user) { create :user }
+ context 'external program' do
+ let!(:external_program) { create :external_program, team: team }
+
+ context 'that runs a private program' do
+ let(:team) { create :team, :soft_launched }
+
+ context 'user does not have access to private program' do
+ it 'does not claim the credential' do
+ expect { subject }.not_to change { credential.reload.user }
+ end
+ end
+ end
+ end
+
it { expect { subject }.to change { credential.reload.user }.from(nil).to(current_user) }
it 'checks if it should send a low-credential-count notification' do
Impact
An attacker can drain the pool of credentials and obtain new credentials, even when they don't have access to the program. This may leak sensitive information.
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 claim-credential mutation authorised the request only on the basis of the external program and the logged-in user, without verifying membership of the linked private program.
Impact
An attacker could drain the pool of credentials and obtain new credentials for a private program they cannot access, which may leak sensitive information.
What the attacker needed
A logged-in account; a private program with a published external program
The fix
The claim action should check that the user has access to the private program before handing out a credential, as the regression test expects.
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.
A public page can exist for a company whose programme is private. A credential is access data handed to researchers. The claim action did not stop a user without access to the private programme from claiming its credential.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.