dns/ddclient: DuckDNS token is written to syslog in clear text when the update request fails (native backend)
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- networking, security
Research direction
The leak is in the except Exception block of the DuckDNS account class in lib/account/duckdns.py, where str(e) goes straight to syslog.syslog. Start by confirming that the request URL with the token reaches that exception text, then catch the error and log a message that omits the URL or redacts the password value. Done means a failed update never writes the token to syslog, and you have checked whether other account classes in lib/account/ have the same pattern.
Written by the indexing model from the issue text.
Description
Important notices
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- The title contains the plugin to which this issue belongs
Describe the bug
With the native backend, lib/account/duckdns.py sends the token as a query parameter
(requests.get(proto+'://www.duckdns.org/update', data)) and on any exception logs str(e):
except Exception as e:
syslog.syslog(syslog.LOG_ERR, str(e))
For connection errors, requests includes the full request URL in the exception text, so the
log line contains the token in clear text, e.g.
HTTPSConnectionPool(host='www.duckdns.org', port=443): Max retries exceeded with url:
/update?domains=<name>&token=<TOKEN IN CLEAR TEXT>&ip=<ip> (Caused by ...)
The line is logged at LOG_ERR, so it also reaches every remote syslog target. Anyone who can read
the logs (locally or on the log server) can then repoint the DuckDNS name.
To Reproduce
- Configure a DuckDNS account in Services → Dynamic DNS (native backend).
- Make the first update fail at network level, e.g. right after a PPPoE reconnect before the
line is ready (this is how we saw it, twice in the last eight weeks), or by temporarily blocking
www.duckdns.org. - Look at the system log / remote syslog: the
ddclienterror line containstoken=....
Expected behavior
Credentials never appear in log output. For example, catch the exception and log without the URL,
or redact the token before logging:
except Exception as e:
msg = str(e).replace(self.settings.get('password') or '\0', '***')
syslog.syslog(syslog.LOG_ERR, f"DuckDNS update failed for {self.description}: {msg}")
(The dyndns2-based services are not affected: they send credentials via HTTPBasicAuth, so the
URL in an exception contains no secret. Other account classes that put secrets into the URL
may deserve the same check.)
Environment
- OPNsense 26.7.8_1 (amd64)
- os-ddclient as shipped with 26.7.8_1, native backend
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 905
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 16
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opnsense/plugins
-
security/tailscale: add description to restart servicePossibly taken @drpsyko101 claimed this 2 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
security/acme-client: missing accounts directory causes DNS-01 validation failureMay be free again A pull request for this issue was closed without being merged. Opensupport
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
opnsense/plugins#5770 · 1 comment ·
Maintainers usually reply within 2 days
-
security/tor: Advanced mode / help toggles are brokenPossibly taken @txr13 claimed this 44 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
os-opnproxy 1.0.5_5Openincomplete
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
opnsense/plugins#5710 · 1 comment ·
Maintainers usually reply within 2 days
-
net/vnstat: use OPNsense interface names in dashboard widgetPossibly taken @joeroback claimed this 107 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
All issues in opnsense/plugins
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
OpenConext/OpenConext-engineblock#2168 ·
Maintainers usually reply within 5 days
-
mobile-app
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Open-Locker/Open-Locker#352 ·
Maintainers usually reply within 1 day
-
[Bug]: SCIM Users groups[].value is returned as an integer, causing authentik user discovery to failOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
grokability/snipe-it#20006 ·
Maintainers usually reply within 1 day
-
fixed
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
firefly-iii/firefly-iii#13150 · 2 comments ·
Maintainers usually reply within 1 day
-
type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day