Repository navigation
Conversation
`OutputFile` was treated as a goimpacket option instead of a fs sink. Since goimpacket writes the ccache itself, krbforge had to enforce nuclei's local file policy before building the ticket config. Add execution-aware JS wrappers, normalize relative output paths into the template sandbox, and deny outside paths unless local file access is enabled. Keep empty output as in-memory only by passing "-". Signed-off-by: Dwi Siswanto <git@dw1.io>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough
ChangesKerberos Ticket Forging: goja wrappers and sandbox output path enforcement
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai create an issue for this, prefixed with |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
gh issue create \
--repo "projectdiscovery/nuclei" \
--title "[BUG] krbforge JS bindings do not enforce sandbox policy for ccache file writes" \
--body "## Description
The JavaScript bindings for the \`krbforge\` module do not enforce Nuclei's local file access sandbox policy when writing credential cache (ccache) files via the \`OutputFile\` option.
## Root Cause
\`OutputFile\` is treated as a goimpacket library option rather than a filesystem sink. Since goimpacket handles the actual ccache file writing internally, \`krbforge\` was unable to enforce Nuclei's local file access policies before the ticket configuration was built. This means a malicious or misconfigured template could write ccache files to arbitrary filesystem locations without requiring \`-allow-local-file-access\` to be explicitly enabled by the user.
## Impact
- Templates using \`krbforge.CreateGoldenTicket\` or \`krbforge.CreateSilverTicket\` with an \`OutputFile\` pointing outside the sandbox directory could write ccache files to arbitrary paths on the host filesystem.
- The sandbox restriction (\`-allow-local-file-access\`) is bypassed entirely for this code path.
## Steps to Reproduce
Use a Nuclei template that calls \`krbforge.CreateGoldenTicket\` or \`krbforge.CreateSilverTicket\` with an \`OutputFile\` path pointing outside the template sandbox directory (e.g., \`/tmp/evil.ccache\`) without passing \`-allow-local-file-access\`. The file will be written without restriction.
## Expected Behavior
Paths outside the sandbox directory should be rejected unless \`-allow-local-file-access\` is explicitly enabled. Empty or unspecified output paths should default to in-memory operations (passing \`\"-\"\` to the underlying library) rather than writing to disk.
## Related
- Fixed in PR `#7482`
/cc `@dwisiswant0`"Length of output: 1952
|
nuclei 3.10.0 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## What's Changed ### 🎉 New Features * Added per-host HTTP client pooling by @Mzack9999 in projectdiscovery/nuclei#7301 ### 🐞 Bug Fixes * Fixed handling in hosterrorscache to automatically skip hosts that consistently time out by @knakul853 in projectdiscovery/nuclei#7455 * Fixed preservation of explicit target port in network templates (fixes #7323) by @XananasX7 in projectdiscovery/nuclei#7465 * Fixed connection reuse and improved port pre-flight handling by @Mzack9999 in projectdiscovery/nuclei#6715 * Fixed code template signature validation before DAST loading by @dogancanbakir in projectdiscovery/nuclei#7472 * Fixed gating of MySQL allowAllFiles option to require `-lfa` flag by @dogancanbakir in projectdiscovery/nuclei#7473 * Fixed ASCII-section regex to properly escape literal `.` by @snicket2100 in projectdiscovery/nuclei#7476 * Fixed recording of decoded bytes for debug dumps by @snicket2100 in projectdiscovery/nuclei#7478 * Fixed proper escaping of dbname in lib/pq URLs by @dwisiswant0 in projectdiscovery/nuclei#7479 * Fixed network policy enforcement prior to LDAP dialing by @dwisiswant0 in projectdiscovery/nuclei#7494 * Fixed normalization and rejection of trace file DSN options in Oracle by @dwisiswant0 in projectdiscovery/nuclei#7480 * Fixed proper escaping of MSSQL database names in connection URLs by @dwisiswant0 in projectdiscovery/nuclei#7481 * Fixed krbforge to reject unsandboxed ccache writes by @dwisiswant0 in projectdiscovery/nuclei#7482 * Fixed rejection of request-condition(s) during fuzzing by @dwisiswant0 in projectdiscovery/nuclei#7466 * Fixed: YAML now correctly rejects recursive include chains by @dwisiswant0 in projectdiscovery/nuclei#7492 * Fixed resource leaks by @Mzack9999 in projectdiscovery/nuclei#7502 ### Other Changes * Updated govaluate dependency to prevent slice-bounds panic on invalid UTF-8 input by @XananasX7 in projectdiscovery/nuclei#7464 * Updated goja dependency by @Mzack9999 in projectdiscovery/nuclei#7467 * Updated dependencies to remove unused packages by @dwisiswant0 in projectdiscovery/nuclei#7457 * Refactored templates to centralize opt-in capability gating by @dwisiswant0 in projectdiscovery/nuclei#7489 * Added fuzzing parser harnesses for raw requests and templates by @dwisiswant0 in projectdiscovery/nuclei#7459 * Refactored template rendering boundary by @dwisiswant0 in projectdiscovery/nuclei#7499 ## New Contributors * @XananasX7 made their first contribution in projectdiscovery/nuclei#7465 * @snicket2100 made their first contribution in projectdiscovery/nuclei#7476 **Full Changelog**: https://github.com/projectdiscovery/nuclei/compare/v3.9.0...v3.10.0</pre> <p>View the full release notes at <a href="https://github.com/projectdiscovery/nuclei/releases/tag/v3.10.0">https://github.com/projectdiscovery/nuclei/releases/tag/v3.10.0</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!13187
Proposed changes
OutputFilewas treated as a goimpacket optioninstead of a fs sink. Since goimpacket writes the
ccache itself, krbforge had to enforce nuclei's
local file policy before building the ticket
config.
Add execution-aware JS wrappers, normalize
relative output paths into the template sandbox,
and deny outside paths unless local file access is
enabled. Keep empty output as in-memory only by
passing "-".
Proof
Checklist
Summary by CodeRabbit
Bug Fixes
-allow-local-file-accessflag for external paths.Refactor