Title: Read access for group/everyone is allowed on ConsoleHost_history.txt file by default. · Issue #6679 · PowerShell/PowerShell · GitHub
Open Graph Title: Read access for group/everyone is allowed on ConsoleHost_history.txt file by default. · Issue #6679 · PowerShell/PowerShell
X Title: Read access for group/everyone is allowed on ConsoleHost_history.txt file by default. · Issue #6679 · PowerShell/PowerShell
Description: Steps to reproduce NOTE: This issue was only validated on Linux (RHEL7) but could potentially be an issue on Windows as well, depending on how the history file is stored/used. Install pwsh, and perform an ls -l on the following file: ~/....
Open Graph Description: Steps to reproduce NOTE: This issue was only validated on Linux (RHEL7) but could potentially be an issue on Windows as well, depending on how the history file is stored/used. Install pwsh, and per...
X Description: Steps to reproduce NOTE: This issue was only validated on Linux (RHEL7) but could potentially be an issue on Windows as well, depending on how the history file is stored/used. Install pwsh, and per...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/6679
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Read access for group/everyone is allowed on ConsoleHost_history.txt file by default.","articleBody":"Steps to reproduce\r\n------------------\r\n\r\n```\r\nNOTE: This issue was only validated on Linux (RHEL7) but could potentially be an issue on Windows as well, depending on how the history file is stored/used.\r\n\r\nInstall pwsh, and perform an ls -l on the following file:\r\n\r\n~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n```\r\nOnly the owner should have access to read this file. In it's current configuration, in addition to the owner, both group/everyone can also read this file. Due to the content of this file, only the owner should have read rights by default. With the current permission structure, a threat actor could read/replay the command history and use it for malicious purposes. \r\n\r\nThe CHMOD file map should be set to 700 or 600 by default.\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\n```\r\nBy default the CHMOD access map on this file is: 664\r\n\r\nThe above file map grants the owner R/W, the group R/W, and everyone R.\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n```\r\n> Name Value\r\n---- -----\r\nPSVersion 6.0.0\r\nPSEdition Core\r\nGitCommitId v6.0.0\r\nOS Linux 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Dec 28 14:23:39 EST 2017\r\nPlatform Unix\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n\r\n```\r\n","author":{"url":"https://github.com/MichaelStankiewicz","@type":"Person","name":"MichaelStankiewicz"},"datePublished":"2018-04-19T13:10:37Z","url":"https://github.com/PowerShell/PowerShell/issues/6679"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:111eeba6-75ed-e9a3-a1c6-a9cd70762656 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B71C:2ACF16:10F953:1746DD:6AFD4C91 |
| html-safe-nonce | ba3a9c61e013e57760e5a4adb51950ce700ea9e883484db251d2140b8764d1f5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzFDOjJBQ0YxNjoxMEY5NTM6MTc0NkREOjZBRkQ0QzkxIiwidmlzaXRvcl9pZCI6IjkxNTcwMjEyMTkxOTc2MzU3MjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5e64aa331b501a01c9046e3387e64ef8770b5c2863cea6103d029c15f7c2f691 |
| hovercard-subject-tag | issue:315870877 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/6679/issue_layout |
| twitter:image | https://opengraph.githubassets.com/583caa88ea1193b2bb00fecb0ac605bef1fdf8e0f6ba133681b1ddb5dd2d2677/PowerShell/PowerShell/issues/6679 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/583caa88ea1193b2bb00fecb0ac605bef1fdf8e0f6ba133681b1ddb5dd2d2677/PowerShell/PowerShell/issues/6679 |
| og:image:alt | Steps to reproduce NOTE: This issue was only validated on Linux (RHEL7) but could potentially be an issue on Windows as well, depending on how the history file is stored/used. Install pwsh, and per... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MichaelStankiewicz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width