René's URL Explorer Experiment


Title: Crash if wrong hex string is written to http.ClientRequest · Issue #45150 · nodejs/node · GitHub

Open Graph Title: Crash if wrong hex string is written to http.ClientRequest · Issue #45150 · nodejs/node

X Title: Crash if wrong hex string is written to http.ClientRequest · Issue #45150 · nodejs/node

Description: Version 19.0.0 (but happens also on older versions, last retest with 21.4.0) Platform all Subsystem http, maybe streams What steps will reproduce the bug? if an invalid hex encoded string is written to a http.ClientRequest node crashes/a...

Open Graph Description: Version 19.0.0 (but happens also on older versions, last retest with 21.4.0) Platform all Subsystem http, maybe streams What steps will reproduce the bug? if an invalid hex encoded string is writte...

X Description: Version 19.0.0 (but happens also on older versions, last retest with 21.4.0) Platform all Subsystem http, maybe streams What steps will reproduce the bug? if an invalid hex encoded string is writte...

Opengraph URL: https://github.com/nodejs/node/issues/45150

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash if wrong hex string is written to http.ClientRequest","articleBody":"### Version\r\n\r\n19.0.0 (but happens also on older versions, last retest with 21.4.0)\r\n\r\n### Platform\r\n\r\nall\r\n\r\n### Subsystem\r\n\r\nhttp, maybe streams\r\n\r\n### What steps will reproduce the bug?\r\n\r\nif an invalid hex encoded string is written to a `http.ClientRequest` node crashes/asserts.\r\n\r\n```js\r\nconst http = require(\"http\");\r\n\r\nconst request = http.request(\"http://example.org\", {method: \"POST\"});\r\nrequest.write(\"1\", \"hex\");\r\n```\r\n\r\n### How often does it reproduce? Is there a required condition?\r\n\r\nalways\r\n\r\n### What is the expected behavior?\r\n\r\nMore graceful error handling like a JS exception.\r\n\r\n### What do you see instead?\r\n\r\nassert/crash\r\n\r\n```\r\nnode[360]: ../src/string_bytes.cc:420:static v8::Maybe\u003clong unsigned int> node::StringBytes::StorageSize(v8::Isolate*, v8::Local\u003cv8::Value>, node::encoding): Assertion `str->Length() % 2 == 0 && \"invalid hex string length\"' failed.\r\n 1: 0xbbf330 node::Abort() [node]\r\n 2: 0xbbf3ae  [node]\r\n 3: 0xcaf8ba node::StringBytes::StorageSize(v8::Isolate*, v8::Local\u003cv8::Value>, node::encoding) [node]\r\n 4: 0xca562a node::StreamBase::Writev(v8::FunctionCallbackInfo\u003cv8::Value> const&) [node]\r\n 5: 0xca7876 void node::StreamBase::JSMethod\u003c&node::StreamBase::Writev>(v8::FunctionCallbackInfo\u003cv8::Value> const&) [node]\r\n 6: 0xe03f00  [node]\r\n 7: 0xe05356 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]\r\n 8: 0x17fb3f9  [node]\r\nAborted (core dumped)\r\n```\r\n\r\n### Additional information\r\n\r\nThis seems to be not limited to http, net shows same problem with following code:\r\n```js\r\nconst net = require(\"node:net\");\r\nconst s = net.createConnection(8000);\r\ns.on(\"connect\", () => {\r\n    s.cork()\r\n    s.write(\"a\")\r\n    s.write(\"1\", \"hex\");\r\n    s.uncork()\r\n});\r\n```\r\nInteresting is that following net sample doesn't crash:\r\n```js\r\nconst net = require(\"node:net\");\r\nconst s = net.createConnection(8000);\r\ns.on(\"connect\", () => {\r\n    s.write(\"1\", \"hex\");\r\n});\r\n```\r\nSeems in this case the single, invalid hex encoded byte is silently discarded.","author":{"url":"https://github.com/Flarna","@type":"Person","name":"Flarna"},"datePublished":"2022-10-24T13:50:21Z","url":"https://github.com/nodejs/node/issues/45150"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:25764a59-bc50-e313-c163-160a893b13d5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id838E:2973C7:447261:58DA14:6AED2238
html-safe-nonceeb8ce89f59f9a398d0900d796dab3053551617d700d617e8171171b634790e34
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzhFOjI5NzNDNzo0NDcyNjE6NThEQTE0OjZBRUQyMjM4IiwidmlzaXRvcl9pZCI6IjQwMzM0Nzk3NzYwMjg5MjY1MjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc460fdb27561069c0400b09252a78d5ba3c05d717bc6d50d49e5cec41b162b39
hovercard-subject-tagissue:1420866686
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/45150/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3ad72b19c7d3696bd9f976759ea776323497cdbfd00f148bd7dfaa7457785b25/nodejs/node/issues/45150
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3ad72b19c7d3696bd9f976759ea776323497cdbfd00f148bd7dfaa7457785b25/nodejs/node/issues/45150
og:image:altVersion 19.0.0 (but happens also on older versions, last retest with 21.4.0) Platform all Subsystem http, maybe streams What steps will reproduce the bug? if an invalid hex encoded string is writte...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameFlarna
hostnamegithub.com
expected-hostnamegithub.com
Nonee3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release707a24b346ac8a82878b9c084efaa38a997660cb
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/45150#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F45150
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F45150
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/45150
Reloadhttps://github.com/nodejs/node/issues/45150
Reloadhttps://github.com/nodejs/node/issues/45150
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues657 (657)https://github.com/nodejs/node/issues
Pull requests666 (666)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/45150
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/45150
#63658https://github.com/nodejs/node/pull/63658
Crash if wrong hex string is written to http.ClientRequesthttps://github.com/nodejs/node/issues/45150#top
#63658https://github.com/nodejs/node/pull/63658
confirmed-bugIssues and PRs for confirmed bugs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22confirmed-bug%22
httpIssues and PRs related to the http subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22http%22
https://github.com/Flarna
Flarnahttps://github.com/Flarna
on Oct 24, 2022https://github.com/nodejs/node/issues/45150#issue-1420866686
https://github.com/juanarbol
juanarbolhttps://github.com/juanarbol
on Oct 24, 2022https://github.com/nodejs/node/issues/45150#issuecomment-1289256444
juanarbolhttps://github.com/juanarbol
confirmed-bugIssues and PRs for confirmed bugs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22confirmed-bug%22
on Oct 24, 2022https://github.com/nodejs/node/issues/45150#event-7655444329
cola119https://github.com/cola119
httpIssues and PRs related to the http subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22http%22
on Oct 25, 2022https://github.com/nodejs/node/issues/45150#event-7663906929
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#63658https://github.com/nodejs/node/pull/63658
on Jul 25, 2026https://github.com/nodejs/node/issues/45150#event-28476966239
nodejs-github-bothttps://github.com/nodejs-github-bot
on Jul 25, 2026https://github.com/nodejs/node/issues/45150#event-28476966267
src: fix crash when writing odd-length hex string via Writevhttps://github.com/nodejs/node/commit/3e06d536a9c3425bc8691ad7bb30918b45e4ae75
3e06d53https://github.com/nodejs/node/commit/3e06d536a9c3425bc8691ad7bb30918b45e4ae75
aduh95https://github.com/aduh95
on Aug 3, 2026https://github.com/nodejs/node/issues/45150#event-28901681263
src: fix crash when writing odd-length hex string via Writevhttps://github.com/nodejs/node/commit/db8d7d112554b6f4a29089f27c9fce530960d5db
db8d7d1https://github.com/nodejs/node/commit/db8d7d112554b6f4a29089f27c9fce530960d5db
src: fix crash when writing odd-length hex string via Writevhttps://github.com/nodejs/node/commit/8725e569286a3be473ebdaafaa0e5670737614b9
8725e56https://github.com/nodejs/node/commit/8725e569286a3be473ebdaafaa0e5670737614b9
src: fix crash when writing odd-length hex string via Writevhttps://github.com/nodejs/node/commit/37085f850d8eb48197c94a09b6bfed2c86400dd0
37085f8https://github.com/nodejs/node/commit/37085f850d8eb48197c94a09b6bfed2c86400dd0
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/45150
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/45150
confirmed-bugIssues and PRs for confirmed bugs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22confirmed-bug%22
httpIssues and PRs related to the http subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22http%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.