T08 · Insecure Dependencies
- Location
references/ocr-implementation.md:186- Finding
Mutable and Unverified OCR Container Dependency
- Content
View full analysis
Vulnerability Details
File Location:
references/ocr-implementation.md, lines 186-193
Vulnerability Type: Supply-chain risk from an unpinned container image
Risk Level: MediumVulnerable Code
bash # Pull the PaddleOCR Docker image docker pull paddlepaddle/paddleocr:latest # Start the OCR service using the CPU version docker run -d --name paddle-ocr -p 8866:8866 \ paddlepaddle/paddleocr:latest \ /bin/bash -c "python3 -m paddleocr --server"Technical Analysis
The deployment instructions retrieve and execute the mutable
latestimage without specifying an immutable digest or fixed, reviewed version. No signature, provenance, checksum, or software bill of materials verification is required before execution.Because the content associated with
latestcan change after the Skill has been audited, administrators cannot reliably determine which code will execute. Compromise of the image publisher, registry account, build pipeline, or tag could cause a malicious image to be pulled and executed.Attack Path
- An attacker compromises the upstream image publication process, registry account, or mutable
latesttag. - The attacker publishes a modified image under
paddlepaddle/paddleocr:latest. - A school administrator follows the documented
docker pullcommand. - Docker retrieves the attacker-controlled image without integrity or provenance verification.
- The documented
docker runcommand executes the malicious image. - Malicious container code accesses student submissions available to the OCR service, abuses exposed network access, or attacks accessible host and internal resources.
Impact Assessment
Successful exploitation provides code execution inside the OCR container. The resulting scope depends on the runtime configuration, attached storage, network connectivity, Docker daemon security, and container privileges.
Potential impact includes unauthorized ...[truncated 300 chars]
- An attacker compromises the upstream image publication process, registry account, or mutable
- Remediation
View remediation
Remediation Suggestions
- Replace
latestwith a reviewed, fixed version and immutable SHA-256 image digest. - Verify the image signature and publisher identity before deployment.
- Generate and review an SBOM, and scan the resolved image for known vulnerabilities.
- Establish an explicit update process that tests and approves each new image digest.
- Run the container as a dedicated non-root user.
- Use a read-only root filesystem and temporary writable volumes only where required.
- Drop all unnecessary Linux capabilities and enable
no-new-privileges. - Avoid mounting the Docker socket, host root directories, credentials, or unrelated student-data stores.
- Restrict outbound network access to destinations strictly required by the OCR workload.
- Document the expected image digest and verification commands in the deployment guide.
- Replace
