SEC2-064: Reference notifier's test() echoes the OSError text, server-side path included, to the account holder #13
Labels
No labels
bug
documentation
enhancement
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-helloworld#13
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-10-16 in a read-only security review of
postulo-helloworldat6afab68, checked by a second, independent pass.Severity: Informational · Category: Data Exposure · Reference: CWE-209 (Generation of Error Message Containing Sensitive Information); OWASP A04:2021 (Insecure Design)
Location:
src/postulo_helloworld/notifier.py:154-157Issue
str(OSError)carries the filename, as in[Errno 13] Permission denied: '/srv/postulo/data/helloworld/x.log'. The person who pressed Test reads where the operatorkeeps the directory, which
file_for()takes pains to keep out of their hands. In a referenceplugin that others copy, this shape (
%(error)swith the raw exception) is what gets copied.Impact
Disclosure of a server path to a signed-in person. No further reach.
Fix
{"error": error.strerror or type(error).__name__}, so the reason is shown without the path.Done when
test_a_directory_that_cannot_be_written_to_fails_the_test_button_in_wordsraises anerror that carries a filename,
PermissionError(13, "Permission denied", str(directory / "hello.log"))(the currentPermissionError("read-only file system")has none), and assertsstr(directory) not in result.message.