Details
Severity
Suggested severity: High.
Suggested CVSS v3.1:
Rationale:
AV: applies when an application exposes a PraisonAI agent over a network chat/API surface, which is a documented PraisonAI deployment pattern.AC: no race, special environment, or complex path manipulation is required; an absolute readable path is sufficient.PR: an unauthenticated or public-facing agent endpoint can be exploited without an account. Deployments that require authenticated chat/API access may score this asPR:L.UI: the attacker directly supplies the prompt/tool argument to the exposed agent surface.C: arbitrary readable host files can contain secrets or private data.I/A: this report demonstrates read-only disclosure.
Remediation
Do not let artifact tools open arbitrary paths. Prefer stable artifact IDs over
raw filesystem paths in tool arguments.
Recommended fixes:
- Change tool schemas to accept
artifact_idplus optionalrun_idandagent_id, then resolve those through the artifact store's metadata/index. - If path arguments must remain for compatibility, resolve the path with
Path(path).resolve()and reject it unless it is underartifact_store.base_dir.resolve(). - Require a valid artifact metadata sidecar for read helpers. Files not created by
FileSystemArtifactStore.store()should not be readable through artifact tools. - Apply the same containment check to
load(),head(),tail(),grep(),chunk(), anddelete(). - Avoid returning absolute host paths in prompt-visible artifact references when an opaque artifact ID would suffice.
Minimal containment helper:
def _resolve_artifact_path(self, path: str) -> Path:
resolved = Path(path).expanduser().resolve()
base = self.base_dir.resolve()
try:
resolved.relative_to(base)
except ValueError as exc:
raise PermissionError("Artifact path is outside artifact storage") from exc
return resolved
This helper should be paired with metadata-sidecar validation so arbitrary
non-artifact files placed under the base directory are not automatically
treated as valid artifacts.