T09 · Insecure Skill Coding Practices
- Location
scripts/list_notes.py:35- Finding
WebDAV Credentials Exposed in Process Arguments and Potentially Transmitted over Cleartext HTTP
- Content
View full analysis
Vulnerability Details
File Location:
scripts/list_notes.py:35-38, 56-57;scripts/get_note.py:29-34;scripts/upsert_note.py:83-89
Vulnerability Type: Credential exposure and insecure transport configuration
Risk Level: HighVulnerable Code
scripts/list_notes.py:35-38:python command = [ "curl", "-s", "-u", f"{JOPLIN_USERNAME}:{password}", "-X", "PROPFIND", "--header", "Depth: infinity", url ] result = subprocess.run(command, capture_output=True, text=True, check=True)scripts/list_notes.py:56-57:python command = ["curl", "-s", "-u", f"{JOPLIN_USERNAME}:{password}", f"{url}{filename}"] result = subprocess.run(command, capture_output=True, text=True, check=True)scripts/get_note.py:29-34:python filename = f"{note_id}.md" command = [ "curl", "-s", "-u", f"{JOPLIN_USERNAME}:{password}", f"{url}{filename}" ] result = subprocess.run(command, capture_output=True, text=True)scripts/upsert_note.py:83-89:python command = [ "curl", "-s", "-u", f"{JOPLIN_USERNAME}:{password}", "-X", "PUT", "-T", "-", f"{url}{filename}" ] result = subprocess.run(command, input=content.encode('utf-8'), capture_output=True)Technical Analysis
Each WebDAV operation inserts the value of
JOPLIN_PASSWORDdirectly into thecurlprocess argument list through the-u username:passwordoption. Depending on operating-system process visibility and monitoring configuration, another local user or diagnostic service may be able to observe the complete argument list whilecurlis running.The scripts also accept
JOPLIN_WEBDAV_PATHwithout validating its scheme. If it begins withhttp://, HTTP Basic authentication credentials and Joplin note contents are sent without transport encryption. Basic authentication only encodes credentials and does not provide confidentiality.Attack Path
- A user configures `JOPLIN_W ...[truncated 840 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace command-line
curlexecution with a maintained HTTP/WebDAV library that accepts credentials through an in-memory authentication API. - Require the configured URL to use the
httpsscheme and reject cleartext HTTP. - Preserve TLS certificate and hostname verification; do not add insecure certificate-bypass options.
- Validate the configured destination against an explicit host allowlist where deployment permits.
- Reject URLs containing embedded credentials, unsupported schemes, fragments, or unexpected redirects.
- If
curlmust remain in use, provide credentials through a protected mechanism that does not expose the password in the process argument list. - Use a WebDAV account limited to the required Joplin directory rather than a broadly privileged account.
- Replace command-line
