Skip to content

[HIGH] Credential minting doesn't verify quiz belongs to specified course #28

Description

@DeFiVC

Description

In src/modules/credentials/credential.service.ts:31-41, the mint method accepts courseId and submissionId as independent parameters. The submission lookup only filters by submissionId + userId — it never joins with quizzes to verify quizzes.courseId === courseId.

A user could pass a passing quiz for Course A and mint a credential for Course B.

Impact

Users can obtain credentials for courses they never completed.

File

src/modules/credentials/credential.service.ts:31-41

Suggested Fix

Join the submission query with the quizzes table to verify that quizzes.courseId matches the requested courseId.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignbugSomething isn't workinghighsecuritySecurity concern

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions