Summary
PlaciPy 1.0.0 exposes a code evaluation endpoint that fails to validate the assessment lifecycle state (e.g., not started, expired, or outside the submission window) before executing code.
This missing authorization check can allow users to execute assessment-related code outside the intended timeframes, undermining exam integrity and institutional policies.
Affected context
The vulnerability appears in the assessment management and code evaluation component of PlaciPy when used for timed or windowed assessments in educational environments.
It is relevant where:
- Assessments have defined start times, end times, or submission windows
- The same code evaluation endpoint is exposed to students or candidates
- Lifecycle checks (started, not expired, window open) are expected to gate access, but are not enforced at the endpoint itself
Deployments that rely on time-based or state-based access control for exams or coding tests are particularly exposed.
Exploit preconditions
- Attack surface: HTTP(S) code evaluation endpoint used during assessments.
- Required access: Ability to authenticate or otherwise reach the code evaluation API as a normal user (student/candidate) or, in weaker deployments, possibly as an unauthenticated user if the endpoint is publicly exposed.
- Trigger point: Sending a request to the code evaluation endpoint referencing an assessment that has not started, has already expired, or for which the submission window is closed.
- Why exploitation is possible: The server-side logic does not enforce assessment lifecycle rules at the evaluation endpoint. It authorizes execution based solely on user identity and/or assessment reference, without verifying that the assessment is in a valid state for code submission.
Why this happens
This issue stems from incomplete server-side authorization logic, aligning with CWE-285: Improper Authorization.
The evaluation endpoint implicitly trusts that requests occur within valid timeframes, relying on external workflow assumptions instead of explicit checks.
As a result, key authorization conditions—such as "assessment has started," "assessment is not expired," and "submission window is open"—are not validated at the time of the request.
This design flaw allows users to perform operations (code execution for grading or feedback) that should be restricted based on the assessment's lifecycle state.
Potential impact
- Candidates may execute and refine solutions before an assessment officially starts.
- Users could continue submitting or testing solutions after the exam or assignment has ended.
- Assessment integrity and fairness may be compromised across cohorts and sessions.
- Institutions could face policy violations, disputes, or accreditation issues related to uncontrolled assessment timing.
- Automation or scripted abuse may overload evaluation resources outside scheduled windows.
General mitigation guidance
Effective mitigation centers on enforcing explicit, centralized authorization checks tied to the assessment lifecycle:
- Apply server-side validation that the assessment is in a valid state (started, not expired, submission window open) before any code is accepted or executed.
- Treat lifecycle rules as part of the authorization layer, not the client or UI workflow.
- Encapsulate assessment state checks in a reusable authorization service or middleware used by all assessment-related endpoints, including evaluation, submission, and resubmission.
- Implement defense-in-depth with rate limiting and throttling on evaluation endpoints to constrain abuse and resource exhaustion.
- Log and monitor all assessment-related actions with timestamps and assessment states to support audits and anomaly detection.
These measures help ensure that assessment operations are tightly bound to institutional policies and scheduling constraints.
How teams detect issues like this
Detection typically involves a combination of code-level review and behavioral monitoring:
- Static analysis & code review:
- Look for controller or route handlers for evaluation endpoints that lack explicit checks on assessment state, start/end timestamps, or submission windows.
- Identify authorization logic that only verifies user identity or role, without contextual constraints based on assessment lifecycle.
- Enforce security guidelines that mandate business-rule authorization (time/state checks) in all assessment APIs.
- Dynamic and log analysis:
- Analyze logs for evaluation requests occurring outside configured assessment windows.
- Flag requests that reference assessments marked as not started or closed in the database.
- Monitor for unusual patterns, such as bursts of evaluation activity immediately before or long after scheduled assessment times.
- Automated policy enforcement:
- Integrate security checks into CI/CD that verify the presence of lifecycle validation in assessment-related endpoints.
- Use API gateways or middleware that validate key business constraints before forwarding requests to evaluation services.

